Elimination of common subexpressions in complex database queries
US10901990B1 · kind B1 · utility
Assignee
Inventors
Key dates
| Filing date | Jan 31, 2018 |
| Grant date | Jan 26, 2021 |
| Priority date | — |
| Expiry date | Sep 2, 2039 |
Classification
- Technology area (CPC G)Physics
- CPC primaryG06F16/24542
- WIPO fieldComputer technology
- WIPO sectorElectrical engineering
Abstract
A database engine receives a human-readable database query that includes a plurality of conditional expressions. The database engine parses the database query to build an operator tree that includes a subtree corresponding to each of the conditional expressions. The database engine identifies a subexpression that appears in two or more of the conditional expressions. The subexpression is executed conditionally. The database engine hoists the subexpression outside of the conditional expression so that it is executed unconditionally. The database engine modifies the operator tree to specify computation of a value for the subexpression a first time and to reuse the computed value when the subexpression is subsequently encountered. The database engine executes the modified operator tree to form a result set corresponding to the database query, thereby evaluating the subexpression only a single time for each row of input data and returns the result set.
Source: USPTO / EPO open patent data. Objective bibliographic and citation counts.