Transformation rule profiling for a query optimizer
First Claim
1. A method for transformation rule profiling for a query optimizer, comprising:
- obtaining a database query configured to be optimized by the query optimizer of a database system;
finding an optimized query plan for the database query using a host set of transformation rules;
removing individual transformation rules from a query plan generation, wherein one transformation rule is removed and checked at a time;
generating a test query plan after one transformation rule has been removed;
determining whether the test query plan is different than the optimized query plan in the absence of the removed transformation rule;
defining a relevance ratio for a transformation rule as a fraction of the total generated test query plans for which the transformation rule is relevant;
creating an equivalent set of transformation rules that includes transformation rules whose relevance ratio exceeds a relevance threshold where the test query plan generated from the equivalent set of transformation rules is equivalent to the optimized plan.
2 Assignments
0 Petitions
Accused Products
Abstract
Technology is described for transformation rule profiling for a query optimizer. The method can include obtaining a database query configured to be optimized by the query optimizer of a database system. An optimized query plan for the database query can be found using a host set of transformation rules. One transformation rule can be removed and checked at a time. Each transformation rule can be checked to determine whether the transformation rule affects an optimal query plan output. A test query plan can be generated after each transformation rule has been removed. The query optimizer can determine whether the test query plan is different than the optimized query plan in the absence of the removed transformation rule. An equivalent set of transformation rules can be created that includes transformation rules where the test query plan generated from the equivalent set of transformation rules is equivalent to the optimized plan.
-
Citations
19 Claims
-
1. A method for transformation rule profiling for a query optimizer, comprising:
-
obtaining a database query configured to be optimized by the query optimizer of a database system; finding an optimized query plan for the database query using a host set of transformation rules; removing individual transformation rules from a query plan generation, wherein one transformation rule is removed and checked at a time; generating a test query plan after one transformation rule has been removed; determining whether the test query plan is different than the optimized query plan in the absence of the removed transformation rule; defining a relevance ratio for a transformation rule as a fraction of the total generated test query plans for which the transformation rule is relevant; creating an equivalent set of transformation rules that includes transformation rules whose relevance ratio exceeds a relevance threshold where the test query plan generated from the equivalent set of transformation rules is equivalent to the optimized plan. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8)
-
-
9. A method for transformation rule profiling for a query optimizer of a database system, comprising:
-
identifying a workload of queries including a plurality of database queries configured to be optimized by the query optimizer of the database system; finding an optimized query plan for a database query using a host set of transformation rules; removing individual transformation rules from a query plan generation, wherein one transformation rule is removed and checked at a time; generating a test query plan after the transformation rule has been removed from the host set of transformation rules; determining whether the test query plan is identical to the optimized query plan in the absence of the removed transformation rule; marking a transformation rule as relevant to a database query based on a changed test plan when the transformation rule has been removed; defining a relevance ratio of a selected rule for a workload of queries as a fraction of queries in the workload of queries where the selected rule is relevant to a query because removal of the transformation rule affects the optimized query plan; and selecting transformation rules with a relevance ratio that exceed a relevance threshold to be applied to queries using the query optimizer. - View Dependent Claims (10, 11, 12, 13, 14, 15, 16)
-
-
17. A system for profiling transformation rules for search queries, comprising:
-
a database server having a database system, a memory storing a plurality of database queries, and a processor; a host set of transformation rules comprising a plurality of transformation rules; a query optimizer configured to use the plurality of transformation rules to optimize the database queries; and a relevance rule module configured to; create an equivalent set of transformation rules that includes transformation rules where the transformation rules are used to find an optimized plan for a data query; find an optimized query plan for a database query using the host set of transformation rules; remove individual transformation rules in a query plan generation process, wherein one transformation rule is removed and checked at a time; generate a test query plan after one transformation rule has been removed; determine whether the test query plan was changed as compared to the optimized query plan in the absence of individual transformation rules; determine a relevance ratio for the plurality of transformation rules in the host set of transformation rules, the relevance ratio indicative of a ratio for which the selected transformation rule was relevant to a plurality of test query plans; and create an equivalent set of transformation rules that includes selected transformation rules where a test query plan generated without the selected transformation rule is different than an optimized plan, and wherein the selected transformation rules comprises transformation rules having a relevance ratio that exceeds a relevance threshold. - View Dependent Claims (18, 19)
-
Specification