Use of materialized transient views in query optimization
First Claim
Patent Images
1. A method of optimizing a database query or batch of queries, the method comprising:
- identifying sharable subexpressions in a query;
generating one or more transient view candidates covering sets of sharable subexpressions;
selecting from among the transient view candidates those candidates that are most beneficial for execution of the query; and
generating an optimized query execution plan including the selected transient views and including operators to materialize the selected transient views for re-use during execution of the optimized query execution plan.
3 Assignments
0 Petitions
Accused Products
Abstract
Methods and systems for integrating use of materialized transient views into generation of an optimized query execution plan. Features and aspects hereof provide rapid identification of common expressions in a query as transient view candidates and then rapidly select among the transient view candidates for those transient views that most benefit the cost of execution of the query. The selected transient views are incorporated into a generated final, optimized query execution plan including operator to materialize the selected transient views for re-use in execution of the query.
-
Citations
20 Claims
-
1. A method of optimizing a database query or batch of queries, the method comprising:
-
identifying sharable subexpressions in a query;
generating one or more transient view candidates covering sets of sharable subexpressions;
selecting from among the transient view candidates those candidates that are most beneficial for execution of the query; and
generating an optimized query execution plan including the selected transient views and including operators to materialize the selected transient views for re-use during execution of the optimized query execution plan. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9)
-
-
10. A method of processing an SQL query, the method comprising:
-
identifying sharable expressions in the SQL query as transient view candidates;
applying one or more heuristic rules to eliminate from further consideration in processing the query any of the identified transient view candidates unlikely to substantially improve execution performance of the SQL query;
performing cost-based query optimization estimating the cost of each of one or more subsets of the identified transient view candidates to generate a final query plan including any remaining identified transient view candidates after application of heuristic; and
executing the final query plan including the step of materializing the remaining identified transient view candidates for re-use while executing the final query plan. - View Dependent Claims (11, 12, 13, 14, 15)
-
-
16. A database query processing system comprising:
-
a query compiler adapted to receive one or more query and adapted to translate the received query into an operator tree including views and operators representing the received query;
a transient view manager adapted to store information regarding identified transient views; and
a query optimizer coupled to receive the operator tree from the query compiler and coupled to exchange information regarding identified transient views with the transient view manager, the query optimizer adapted to generate a query execution plan including zero or more identified transient views to perform the received query. - View Dependent Claims (17, 18, 19, 20)
-
Specification