System and methodology for cost-based subquery optimization using a left-deep tree join enumeration algorithm
First Claim
1. In a database system, a method for optimizing a database query, the method comprising:
- receiving a database query including at least one subquery;
building a query optimization graph for each query block of the database query, the query optimization graph including plan nodes representing subqueries of each query block;
generating a set of access methods and join methods for each plan node, including generating at least one access method for a subquery quantifier based on subquery type and semantic properties of the database query;
determining an optimal access plan for each query block based upon selecting access methods, join methods, and join order for plan nodes of said query optimization graph having favorable execution costs; and
constructing a detailed access plan for execution of the database query based upon the optimal access plan determined for each query block.
3 Assignments
0 Petitions
Accused Products
Abstract
A system providing methodology for cost-based enumeration of subqueries using a left-deep tree join enumeration algorithm is described. In one embodiment, for example, in a database system, a method of the present invention is described for optimizing a database query, the method comprises steps of: receiving a database query including at least one subquery; building a query optimization graph for each query block of the database query, the query optimization graph including plan nodes representing subqueries of each query block; generating a set of access methods and join methods for each plan node, including generating at least one access method for a subquery quantifier based on subquery type and semantic properties of the database query; determining an optimal access plan for each query block based upon selecting access methods, join methods, and join order for plan nodes of the query optimization graph having favorable execution costs; and constructing a detailed access plan for execution of the database query based upon the optimal access plan determined for each query block.
-
Citations
22 Claims
-
1. In a database system, a method for optimizing a database query, the method comprising:
-
receiving a database query including at least one subquery;
building a query optimization graph for each query block of the database query, the query optimization graph including plan nodes representing subqueries of each query block;
generating a set of access methods and join methods for each plan node, including generating at least one access method for a subquery quantifier based on subquery type and semantic properties of the database query;
determining an optimal access plan for each query block based upon selecting access methods, join methods, and join order for plan nodes of said query optimization graph having favorable execution costs; and
constructing a detailed access plan for execution of the database query based upon the optimal access plan determined for each query block. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22)
-
Specification