Query Language Distribution Heuristics for Join Optimization

Resolve Bottlenecks,
Find Innovative Solutions
Generate 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

VSEngineering 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

Engineering Contradiction:
Improvecompleteness of transformationVSAvoidevaluation time
Core Design Contradiction:
Adaptability or versatilityVSLoss of time

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.

Inventive Principle:
Principle #16Partial or excessive action

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

Engineering Contradiction:
Improvecompleteness of transformationVSAvoidnumber of terms
Core Design Contradiction:
Adaptability or versatilityVSQuantity of substance

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.

Inventive Principle:
Principle #16Partial or excessive action

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

Engineering Contradiction:
Improvecompleteness of transformationVSAvoidexpression complexity
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

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.

Inventive Principle:
Principle #16Partial or excessive action

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.

Inventive Principle:
Principle #3Local quality

Data Source

PatentUS10691681B2Query language distribution heuristics
Publication Date: 2020.06.23 MICROSOFT TECHNOLOGY LICENSING LLC
  • US10691681B2 patent drawing
  • US10691681B2 patent drawing
  • US10691681B2 patent drawing

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.