×

Database system with methods for optimizing performance of correlated subqueries by reusing invariant results of operator tree

  • US 6,341,281 B1
  • Filed: 04/02/1999
  • Issued: 01/22/2002
  • Est. Priority Date: 04/14/1998
  • Status: Expired due to Term
First Claim
Patent Images

1. In a computer system having a processor, a memory, and a storage device, said storage device storing a database comprising database tables, each table comprising rows of data records, each data record storing information in database columns, a method for executing a correlated database query for selecting particular ones of said data records, the method comprising:

  • (a) receiving a database query specifying selection of particular ones of said data records, said database query comprising inner and outer query blocks, said inner query block comprising a subquery nested within the database query, wherein said at least one subquery references information from said outer query block;

    (b) determining at least one correlated part and at least one uncorrelated part of said subquery, wherein only said correlated part is capable of being affected by changing values of the outer query block during execution of the database query;

    (c) creating a cache in said memory for at least storing a result computed for said uncorrelated part after said subquery has been executed for the first time; and

    (d) executing said database query, including evaluating said expression of the subquery by;

    (i) computing a result for the correlated part of said subquery, (ii) retrieving the cached result for the uncorrelated part of said subquery, and (iii) computing a value for said subquery by combining said computed result with said retrieved cached result.

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