×

Techniques for optimization of inner queries

  • US 10,152,511 B2
  • Filed: 09/16/2013
  • Issued: 12/11/2018
  • Est. Priority Date: 09/14/2012
  • Status: Active Grant
First Claim
Patent Images

1. A method for query optimization in an on demand database system in which a single table within a database of the database system stores account information for multiple different clients, the multiple different clients having corresponding custom database objects, the method comprising:

  • receiving, an original query having an outer query and one or more inner queries at a query engine of the on demand database system having at least one hardware processor coupled with at least one storage device storing the database, the original query associated with a client of the on demand database system and to be performed using data in the database belonging to the client including at least data stored on a custom database object corresponding to the client;

    identifying, with the query engine, one or more inner queries nested within the original query;

    identifying, with the query engine, a client-specific custom index for the client to which the original query corresponds, the client-specific custom index stored in the database, wherein the client-specific custom index includes a subset of entries specific to the client;

    applying, with the query engine, the client-specific custom index to each of the one or more inner queries treating each or the one or more inner queries as independent queries;

    performing, with the query engine, the optimized one or more inner queries on data stored in the single table prior to generating results for the original query; and

    joining, with the query engine, results from the optimized one or more inner queries with results for the outer query to generate a result for the original query.

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