Database system with methodology for generating bushy nested loop join trees
First Claim
1. An improved method for optimization of a query requesting data from a database, the method executed by a processor comprising:
- generating a search space comprising only left deep nested loop join trees for returning data requested by the query;
traversing the search space to select an optimal left deep nested loop join tree for execution of the query;
after selection of an optimal left deep nested loop join tree including one or more outer joins and/or one or more semi-joins, transforming the selected left deep nested loop join tree into a semantically correct bushy tree structure for returning data requested by the query; and
building a query execution plan for returning data requested by the query based on the semantically correct bushy tree structure.
1 Assignment
0 Petitions
Accused Products
Abstract
A database system with methodology for generating bushy nested loop join trees is described. In one embodiment, for example, an improved method is described for optimization of a query requesting data from a database, the method comprises steps of: generating a left deep operator tree for returning data requested by the query based on traversing a left deep operator tree search space; transforming the left deep operator tree into a semantically correct structure for returning data requested by the query; and building a query execution plan for returning data requested by the query based on the semantically correct structure.
-
Citations
52 Claims
-
1. An improved method for optimization of a query requesting data from a database, the method executed by a processor comprising:
-
generating a search space comprising only left deep nested loop join trees for returning data requested by the query; traversing the search space to select an optimal left deep nested loop join tree for execution of the query; after selection of an optimal left deep nested loop join tree including one or more outer joins and/or one or more semi-joins, transforming the selected left deep nested loop join tree into a semantically correct bushy tree structure for returning data requested by the query; and building a query execution plan for returning data requested by the query based on the semantically correct bushy tree structure. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13)
-
-
14. A computer-readable storage medium having processor-executable instructions for performing a method for optimization of a query requesting data from a database, the method executed by a processor comprising:
-
generating a search space comprising only left deep nested loop join trees for returning data requested by the query; traversing the tree search space to select an optimal left deep nested loop join tree for execution of the query; after selection of an optimal left deep nested loop join tree including one or more outer joins and/or one or more semi-joins, transforming the selected left deep nested loop join tree into a semantically correct bushy tree structure for returning data requested by the query; and building a query execution plan for returning data requested by the query based on the semantically correct bushy tree structure.
-
-
15. A system for optimization of a query requesting data from a database, the system comprising:
-
a computer having a processor and memory; a search engine for generating a search space comprising only left deep nested loop join trees for returning data requested by the query and traversing the search space to select an optimal left deep nested loop join tree for execution of the query; a transform module for transforming the left deep nested loop join tree selected by the search engine and including one or more outer joins and/or one or more semi-joins into a semantically correct bushy tree structure; and a generator module for generating a query execution plan for returning data requested by the query based on the semantically correct bushy tree structure. - View Dependent Claims (16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28)
-
-
29. In a database system, a method for optimization of a query, the method executed by a processor comprising:
-
generating a search space comprising only left deep nested loop join subtree candidate subplans for executing the query; building a plan for executing the query in the search space based on selecting candidate subplans having favorable execution costs; after a plan has been built, determining whether any left deep nested loop join subtree of the plan should be transformed to a semantically correct bushy tree shape; creating a transformed plan by transforming any left deep nested loop join subtrees determined to need transformation to a semantically correct bushy tree shape; and constructing a query execution plan for executing the query based on the transformed plan. - View Dependent Claims (30, 31, 32, 33, 34, 35, 36, 37)
-
-
38. A computer-readable storage medium having processor-executable instructions for performing a method for optimization of a query, the method executed by a processor comprising;
-
generating a search space comprising only left deep nested loop join subtree candidate subplans for executing the query; building a plan for executing the query in the search space based on selecting candidate subplans having favorable execution costs; after a plan has been built, determining whether any left deep nested loop join subtree of the plan should be transformed to a semantically correct bushy tree shape; creating a transformed plan by transforming any left deep nested loop join subtrees determined to need transformation to a semantically correct bushy tree shape; and constructing a query execution plan for executing the query based on the transformed plan.
-
-
39. A system for optimization of a query requesting data from a database, the system comprising:
-
a computer having a processor and memory; a search engine for generating a search comprising only left deep operators trees and traversing the search space to select an optimal left deep operator tree plan for returning data requested by the query; a transform module for transforming the left deep operator tree selected by the search engine and including one or more outer joins and/or one or more semi-joins into a semantically correct bushy tree structure; and a code generator for generating a query execution plan for returning data requested by the query based on the semantically correct bushy tree structure. - View Dependent Claims (40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52)
-
Specification