Method and system for index sampled tablescan
First Claim
1. An optimized query processing system in a database system in a computer system, the optimized query processing system for processing a query to the database system, wherein the database system comprises a table of data and an index correlated to both the query and to the table, the optimized query processing system comprising:
- an optimizer module to receive a query, the optimizer module to determine whether data responsive to the query has low distinct cardinality;
an index accessing module, coupled in communication with the optimizer module, responsive to the optimizer module determining that the data responsive to the query has low distinct cardinality, the index accessing module to access the index to determine if the table contains a first data entry satisfying the query; and
a tablescan module, coupled in communication with the index accessing module, responsive to the index accessing module determining that the first entry satisfies the query and prior to determining that a second data entry satisfies the query, the tablescan module to scan substantially the entire table to retrieve substantially all data values satisfying the query.
3 Assignments
0 Petitions
Accused Products
Abstract
An optimized query processing system and method for a database system. The database system includes a table of data and an index correlated to both the query and to the table. The optimized query processing system includes an index accessing module adapted to access the index to determine if the table contains an entry satisfying a query predicate; and a tablescan module for scanning substantially the entire table and retrieving data satisfying the query. A method is also disclosed for generating database diagnostic data.
-
Citations
16 Claims
-
1. An optimized query processing system in a database system in a computer system, the optimized query processing system for processing a query to the database system, wherein the database system comprises a table of data and an index correlated to both the query and to the table, the optimized query processing system comprising:
-
an optimizer module to receive a query, the optimizer module to determine whether data responsive to the query has low distinct cardinality; an index accessing module, coupled in communication with the optimizer module, responsive to the optimizer module determining that the data responsive to the query has low distinct cardinality, the index accessing module to access the index to determine if the table contains a first data entry satisfying the query; and a tablescan module, coupled in communication with the index accessing module, responsive to the index accessing module determining that the first entry satisfies the query and prior to determining that a second data entry satisfies the query, the tablescan module to scan substantially the entire table to retrieve substantially all data values satisfying the query. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. A computer implemented method of processing a query to a database in a computer system, wherein the database comprises a table of data and an index correlated to both the query and to the table, the method comprising the following steps:
-
receiving the database query; determining whether data responsive to the query has low distinct cardinality; responsive to determining that the data responsive to the query has low distinct cardinality, accessing the index to determine if the table contains a first data entry satisfying a query predicate; and responsive to determining that the fist data entry satisfies the query and prior to determining that a second data entry satisfies the query, scanning substantially the entire table to retrieve substantially all data values satisfying the query. - View Dependent Claims (9, 10)
-
-
11. A program product stored on a computer readable medium having program logic recorded thereon for processing a query to a database system in a computer system, wherein the database system comprises a table of data and an index correlated to both the query and to the table, the program product comprising:
-
code for receiving a query and determine whether data responsive to the query has low distinct cardinality; code for, responsive to determining that the data responsive to the query has low distinct cardinality, accessing the index to determine if the table contains a first data entry satisfying the query; and code for, responsive to determining that the first entry satisfies the query and prior to determining that a second data entry satisfies the query, scanning substantially the entire table to retrieve substantially all data values satisfying the query. - View Dependent Claims (12, 13)
-
-
14. A computer readable medium containing program instructions, which when executed by a processor in a computer system causes the processor to perform a method for processing a query to a database in the computer system, wherein the database comprises a table of data and an index correlated to both the query and to the table, the method comprising:
-
receiving the database query; determining whether data responsive to the query has low distinct cardinality; responsive to determining that the data responsive to the query has low distinct cardinality, accessing the index to determine if the table contains a first data entry satisfying a query predicate; and responsive to determining that the fist data entry satisfies the query and prior to determining that a second data entry satisfies the query, scanning substantially the entire table to retrieve substantially all data values satisfying the query. - View Dependent Claims (15, 16)
-
Specification