Cardinality estimation in databases
AssigneeFuturewei Technologies, Inc.
InventorKuorong CHIANG
Life of this patent
Estimating the term…
Abstract
A server applied to a database management system and a method are provided. By calculating a data skew for a column based on an entropy for the column in a database, storing the data skew to a catalogue in the database, estimating a selectivity for the column by multiplying a first selectivity with the data skew, cardinality estimation in the database management system is improved. By calculating a degree of correlation for two columns in a database, storing the degree of correlation to a catalogue in the database, estimating a selectivity taking into account the degree of correlation, cardinality estimation in the database management system is improved. The improved cardinality estimates in turn improve the query plan generated by the optimizer which leads to better query performance.
Claims20
A server applied to a database management system, comprising:
- a non-transitory memory storage comprising instructions;
- and
- one or more processors in communication with the memory, wherein the one or more processors executes the instructions to:
- calculate a data skew for a first column based on an entropy for the first column in a database, wherein the first column includes a plurality of distinct values;
- store the data skew to a catalogue in the database;
- estimate a selectivity for the first column by multiplying a first selectivity with the data skew;
- and
- generate a query plan based on the estimated selectivity.
A server applied to a database management system which comprises multiple nodes, comprising:
- a non-transitory memory storage comprising instructions;
- and
- one or more processors in communication with the memory, wherein the one or more processors executes the instructions to:
- calculate a node level entropy;
- calculate a node level skew based on the node level entropy;
- determine whether a redistribution cost is available;
- and
- multiply the redistribution cost with the node level skew for cost estimation.
A method applied to a database management system, comprising:
- calculating, by a server in the database management system, a data skew for a first column based on an entropy for the first column in a database, wherein the first column includes a plurality of distinct values;
- storing, by the server, the data skew to a catalogue in the database;
- estimating, by the server, a selectivity for the first column by multiplying a first selectivity with the data skew;
- and
- generating, by the server, a query plan based on the estimated selectivity.
Dependencies are inferred from the claim text.