×

Global optimization of correlated subqueries and exists predicates

  • US 5,761,657 A
  • Filed: 12/21/1995
  • Issued: 06/02/1998
  • Est. Priority Date: 12/21/1995
  • Status: Expired due to Term
First Claim
Patent Images

1. A method of optimizing an SQL query in a computer having a memory, the SQL query being performed by the computer to retrieve data from a relational database stored in one or more electronic storage devices coupled to the computer, the method comprising the steps of:

  • (a) reducing the query in the memory of the computer by labeling query blocks, relations and predicate operands in the query according to their scope using an ordered set of query block numbers, and by determining minimum relation sets for predicate operands and predicate properties in the query;

    (b) generating a plurality of join plans in the memory of the computer by applying a predetermined set of rules to the labels of the query blocks, relations and predicate operands to determine which relations can be joined together and which predicates can be applied to a particular pair of relations; and

    (c) selecting a join plan in the memory of the computer from the plurality of join plans, wherein the selected join plan has a least performance cost associated therewith.

View all claims
  • 2 Assignments
Timeline View
Assignment View
    ×
    ×