×

Methods and systems for optimizing queries in a multi-tenant store

  • US 8,447,754 B2
  • Filed: 12/20/2010
  • Issued: 05/21/2013
  • Est. Priority Date: 04/19/2010
  • Status: Active Grant
First Claim
Patent Images

1. A method of optimizing database queries in a multi-tenant database system having a relational data store and a non-relational data store, the method comprising:

  • receiving a request at a host system for the multi-tenant database system, the request specifying data to be retrieved from the multi-tenant database system;

    retrieving, based on the request via the host system, one or more locations of the data to be retrieved;

    generating, at the host system, a database query based on the request, wherein the database query specifies a plurality of data elements to be retrieved, the plurality of data elements including one or more data elements residing within the non-relational data store and one or more other data elements residing within the relational data store;

    optimizing the database query via a query optimizer to generate an optimized database query having an optimized query syntax that is distinct from a query syntax of the database query;

    executing the optimized database query against the multi-tenant database system to retrieve the data;

    wherein optimizing the database query comprises;

    (i) identifying a first sub-query to a table within relational data store, the first sub-query corresponding to the first portion of the data to be retrieved, (ii) identifying a second sub-query to the non-relational data store;

    the second sub-query corresponding to the second portion of the data to be retrieved, (iii) replicating the table within the relational data store to the non-relational data store, and (iv) generating the optimized database query with one or more sub-queries to fetch both the first portion of the data to be retrieved and the second portion of the data to be retrieved from the non-relational data store; and

    wherein the database query comprises a specified order for two or more database join operations in which at least one of the database join operations comprises joining a child table from the non-relational data store with a master table from the relational data store and wherein optimizing the database query further comprises modifying the specified order for the two or more database join operations.

View all claims
  • 1 Assignment
Timeline View
Assignment View
    ×
    ×