×

Method and apparatus for optimizing queries having group-by operators

  • US 5,598,559 A
  • Filed: 05/28/1996
  • Issued: 01/28/1997
  • Est. Priority Date: 07/01/1994
  • Status: Expired due to Term
First Claim
Patent Images

1. A method for optimizing a query for a relational database, said method comprising:

  • (a) receiving a query to be optimized for processing, the query having a group-by operator; and

    (b) generating query execution plans having a root node, relations which are joined at nodes and nodes representing group-by operations placed preceding every internal join node for which placement of a group-by operation generates an execution plan equivalent to an execution plan having the group-by operation at the root node, wherein each said group-by operation performs a group-by operation on one of said relations, by;

    (b1) identifying grouping columns and aggregate columns for the query; and

    (b2) determining, based on the grouping columns and the aggregate columns for the query, whether a node representing a group-by operation can be placed preceding the join nodes of the execution plan;

    (c) estimating cost for each execution plans; and

    (d) choosing the execution plan having the lowest estimated cost.

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