Using data in materialized query tables as a source for query optimization statistics
First Claim
1. A method of optimizing execution of a query that accesses data stored in one or more base tables in a database of a computer system, comprising:
- using data in one or more materialized query tables (MQTs), wherein the data is generated from the base tables, as statistics for determining an optimal execution plan for the query.
4 Assignments
0 Petitions
Accused Products
Abstract
Data in materialized query tables (MQTs) are used as statistics for determining the optimal execution plan for a query. When an MQT is defined, it is examined to determine whether its data provides statistics for determining an optimal execution plan for a query. If so, then the MQT is identified, in the RDBMS, as a source for statistics. Information needed to exploit the MQT data as statistics is cataloged in the RDBMS. This information includes a characterization of the type of statistics provided by the MQT, the table and column distributions represented by those statistics, and a query for later retrieving relevant data from the MQT during the query optimization process. When a query is accepted for execution, the cataloged relevant information about MQTs is examined to determine whether an MQT exists that provides statistics relevant to optimization of the query. If such an MQT exists, then the relevant data is retrieved from the MQT using the cataloged query. Using the retrieved statistics, an optimal execution plan may be determined for the query.
34 Citations
29 Claims
-
1. A method of optimizing execution of a query that accesses data stored in one or more base tables in a database of a computer system, comprising:
using data in one or more materialized query tables (MQTs), wherein the data is generated from the base tables, as statistics for determining an optimal execution plan for the query. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14)
-
15. A computer-implemented apparatus for optimizing execution of a query that accesses data stored in one or more base tables in a database of a computer system, comprising:
-
(a) a computer system having a data storage device coupled thereto, the data storage device storing the database; and
(b) logic, performed by the computer system, for using data in one or more materialized query tables (MQTs), wherein the data is generated from the base tables, as statistics for determining an optimal execution plan for the query.
-
-
16. An article of manufacture embodying logic for performing a method of optimizing execution of a query that accesses data stored in one or more base tables in a database of a computer system, comprising:
using data in one or more materialized query tables (MQTs), wherein the data is generated from the base tables, as statistics for determining an optimal execution plan for the query. - View Dependent Claims (17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29)
Specification