Database system providing methodology for eager and opportunistic property enforcement
AssigneeSybase, Inc.
InventorMihnea Andrei
Life of this patent
Estimating the term…
Abstract
A database system providing methods for eager and opportunistic property enforcement is described. Plan fragments are generated for obtaining data requested by a query. Plan fragments are grouped together in classes based upon tables of the database covered by each plan fragment. For each class, a particular plan fragment having the lowest execution costs for obtaining the data requested by the query is determined. If grouping is not required at a given class, an operator enforcing ordering is added to this particular sub-plan. However, if grouping is required at the given class, an operator enforcing both grouping and ordering is added to this sub-plan.
Claims43
In a database system, a method for eager ordering enforcement enabling improved query optimization, the method comprising:
- receiving a query requesting data from a database, said query requesting ordering of data;
- generating plan fragments for obtaining data requested by the query;
- grouping said plan fragments into classes, said classes based upon tables of the database covered by each plan fragment;
- for each class, determining a particular plan fragment having the lowest execution costs for obtaining data;
- and
- adding any required ordering enforcement operator to said particular plan fragment.
The method of claim 15, wherein said set ordering operator is subsequently converted into an appropriate physical operator required by the query.
In a database system, a method for eager and opportunistic property enforcement enabling improved query optimization, the method comprising:
- receiving a query requesting data from a database, said query requesting ordering and grouping of data;
- generating plan fragments for obtaining data requested by the query;
- grouping said plan fragments into classes based upon tables covered by each plan fragment;
- if grouping is needed at a given class, adding a grouping enforcement operator to plan fragments in the given class having an ordering on the grouping columns;
- for each class, determining a particular plan fragment having the lowest execution costs;
- and
- adding any required ordering enforcement operator to said particular plan fragment.
In a database system, a method for ordering and grouping enforcement enabling improved query optimization, the method comprising:
- receiving a query requesting data from a database, said query requesting ordering and grouping of data;
- generating sub-plans for obtaining data requested by the query, each said sub-plan comprising a portion of an overall query execution plan;
- organizing said sub-plans into classes based upon tables covered by each sub-plan;
- for each class, determining a particular sub-plan having the lowest execution costs;
- if grouping is not required at a given class, adding an operator enforcing ordering to said particular sub-plan;
- and
- if grouping is required at a given class, adding an operator enforcing grouping and ordering to said particular sub-plan.
Dependencies are inferred from the claim text.