Query Language Distribution Heuristics for Join Optimization
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
The transformation of query language expressions into disjunctive normal form can result in large, cumbersome expressions that are time-consuming to evaluate and lead to repetition of expensive terms, introducing unwanted complexity.
Innovation Solution
The implementation of local distribution heuristics allows for selective distribution of context terms within query language expressions, determining when to distribute and delete context terms on a per-disjunction basis, reducing the need for all terms to be distributed as in disjunctive normal form, and optimizing join ordering without increasing complexity.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If expressions are transformed into disjunctive normal form by distributing all context terms over all disjunctions, then the expression is completely transformed into a disjunction of conjunctions, but the expression becomes very large and time-consuming to evaluate
Solution Approach 1:
The patent applies partial distribution by selectively choosing which context terms to distribute over which disjunctions based on heuristic criteria, rather than distributing all context terms over all disjunctions as in complete disjunctive normal form transformation. This partial action reduces the size of the transformed expression and evaluation time while still achieving beneficial optimization in certain cases.
2Adaptability or versatility
If expressions are transformed into disjunctive normal form, then the expression is completely transformed into a disjunction of conjunctions, but terms that are expensive to evaluate individually are repeated
Solution Approach 1:
The patent performs partial distribution only for selected context-term-disjunction combinations that meet heuristic criteria, avoiding the complete distribution that would create disjunctive normal form. This prevents the repetition of expensive terms while still achieving optimization where beneficial.
3Adaptability or versatility
If all context terms are distributed over all disjunctions, then the expression is fully transformed, but the expression becomes cumbersome and complex
Solution Approach 1:
The patent applies partial distribution selectively rather than completely, transforming only certain subexpressions that benefit from distribution according to heuristic criteria. This maintains a balance between transformation completeness and expression simplicity, avoiding the cumbersome complexity of full disjunctive normal form.
Solution Approach 2:
The patent applies different transformation strategies to different parts of the expression based on local characteristics of context terms and disjunctions. The evaluation engine selectively distributes context terms over specific disjunctions where it determines benefit, rather than applying uniform distribution across the entire expression, thus maintaining local optimality without global complexity.
Data Source
AI summary
Methods, systems, and apparatus, including computer programs encoded on computer storage media, for performing local distribution heuristics. One of the methods includes receiving an original expression having a conjunction comprising a context term and a disjunction of a plurality of other terms. The context term and the disjunction are evaluated according to one or more local distribution heuristics to determine that the context term is a candidate for distribution across the disjunction of the plurality of other terms. In response, a transformed expression is generated in which the candidate context term is distributed across the disjunction of the plurality of other terms.


