Sampling statistics in a database system
First Claim
Patent Images
1. A computer-implemented database system, comprising:
- a processor for receiving a query to be executed against a database table stored within a computer storage device, said processor executing the steps of;
scanning a sample of said table, the sample containing less than all rows of the table;
detecting whether data skew exists in a table column within the sample of said table;
adjusting a size of the sample as the table is scanned based on the detected data skew;
collecting statistics based on the adjusted sample; and
optimizing the performance of said query executed against said database table based upon said collected statistics.
2 Assignments
0 Petitions
Accused Products
Abstract
A database system has the ability to perform sampled statistics collection, in which collection of statistics of a table is based on a sample (less than all rows of the table). The sample size is adjusted as the table is scanned in response to detecting a predetermined characteristic of the table (e.g., skewed data values are detected).
35 Citations
18 Claims
-
1. A computer-implemented database system, comprising:
-
a processor for receiving a query to be executed against a database table stored within a computer storage device, said processor executing the steps of; scanning a sample of said table, the sample containing less than all rows of the table; detecting whether data skew exists in a table column within the sample of said table; adjusting a size of the sample as the table is scanned based on the detected data skew; collecting statistics based on the adjusted sample; and optimizing the performance of said query executed against said database table based upon said collected statistics. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8)
-
-
9. An article comprising at least one storage medium containing instructions that when executed cause a system to:
-
collect statistics of an attribute of a table based on a sample of the table, the sample having less than all rows of the table; detect whether data skew exists in a table column within the sample of the table; vary a size of the sample during statistics collection in response to detecting data skew; collect statistics based on the size of said sample; and optimize the performance of a query executed against said database based upon said collected statistics. - View Dependent Claims (10, 11, 12, 13)
-
-
14. A database system comprising:
-
a storage to store a table; and a controller to; read a sample of the table that is less than all rows of the table; collect statistics based on the sample; detect whether data skew exists in a table column within the sample of the table; adjust a size of the sample in response to detecting data skew; collect statistics based on the adjusted sample; and optimize the performance of a query executed against said database based upon said collected statistics. - View Dependent Claims (15, 16, 17, 18)
-
Specification