Techniques for query statistics inheritance
AssigneeTeradata US, Inc.
InventorsRama Krishna Korlapati, Haiyan Chen
Life of this patent
Estimating the term…
Abstract
Techniques for query statistics inheritance are provided. Statistics for a database are used to determine selectivity estimates for sparse joins and tables being joined together within a given query. These statistics are inherited up to the given query along with the selectivity estimates and provided to a database optimizer to use when developing query plans and selecting an optimal query plan for the given query.
Claims20
A method implemented and programmed within a non-transitory computer-readable storage medium and processed by a processor, the processor configured to execute the method, comprising:
- receiving, via the processor, a query having a database object with a subset of rows defined therein against a base table;
- acquiring, via the processor, statistics for the database object;
- and
- inheriting, via the processor, the statistics to the base table.
A method implemented and programmed within a non-transitory computer-readable storage medium and processed by a processor, the processor configured to execute the method, comprising:
- receiving, via the processor, a query having two tables joined on a column with skewed values;
- acquiring, via the processor, a set of statistics available for the join;
- and
- resolving a priority order for selecting particular portions of the set of statistics.
A processor-implemented system, comprising:
- a memory programmed with a statistics resolver for execution on a processor;
- and
- the memory also programmed with a statistics selector for execution on the processor;
- the statistics selector is configured to permit resolved statistics for a database object to be inherited to a base table within a query, and the statistics selector is configured to resolve a priority order for a set of statistics associated with two tables being joined on a column with skewed values within the query.
Dependencies are inferred from the claim text.