System and method for performing a query in a computer system to retrieve data from a database
First Claim
1. A method of performing a query in a computer system to retrieve data from a database stored on the computer system which comprises a Data-Base Management System (DBMS) with an optimizer, the method comprising:
- generating a Query Execution Plan (QEP) for the query;
assessing said QEP by considering statistical values about previous executions of said query according to said QEP;
determining whether to choose said QEP or to generate a new QEP;
executing said query according to the generated QEP; and
collecting statistical values during execution for optimizing an execution of future queries.
1 Assignment
0 Petitions
Accused Products
Abstract
A computer system and a corresponding method perform a query to retrieve data from a database. The computer system comprises a Data-Base Management System (DBMS) with an optimizer. A Query Execution Plan (QEP) is generated for the query. The QEP is assessed by considering statistical values about previous executions of the query according to the QEP to decide whether to choose the QEP or to generate a new QEP. Furthermore, the statistical values on previous executions of the query are exploited during query optimization. The query is executed according to the chosen QEP. For optimizing the execution of future queries, statistical values about the execution of the query are collected during execution.
-
Citations
23 Claims
-
1. A method of performing a query in a computer system to retrieve data from a database stored on the computer system which comprises a Data-Base Management System (DBMS) with an optimizer, the method comprising:
-
generating a Query Execution Plan (QEP) for the query;
assessing said QEP by considering statistical values about previous executions of said query according to said QEP;
determining whether to choose said QEP or to generate a new QEP;
executing said query according to the generated QEP; and
collecting statistical values during execution for optimizing an execution of future queries. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9)
-
-
10. A computer system for performing a query to retrieve data from a database, comprising:
-
a Data-Base Management System (DBMS) with an optimizer for generating, assessing, and reoptimizing a Query Execution Plan (QEP) for a given query;
a memory for storing once generated QEPs for given queries;
an instrumentation facility for collecting statistical values about an execution of queries according to once generated QEPs;
a runtime engine to initiate the execution of queries according to respectively generated QEPs; and
a logic performed by the computer system, for generating a QEP for the given query;
for exploiting statement execution statistics during the generation of a QEP;
for assessing a generated QEP by considering statistical values about previous executions of said query according to said QEP;
for determining whether to choose said QEP or to generate a new QEP;
for executing said query according to the generated QEP; and
for collecting statistical values during execution for optimizing an execution of future queries. - View Dependent Claims (11, 12, 13, 14, 15, 16)
-
-
17. A computer program product having executable instruction codes to retrieve data from a database, comprising:
-
a first set of instruction codes for generating, assessing, and reoptimizing a Query Execution Plan (QEP) for a given query;
a memory for storing once generated QEPs for given queries;
a second set of instruction codes for collecting statistical values about an execution of queries according to once generated QEPs;
a third set of instruction codes for initiating the execution of the queries according to respectively generated QEPs; and
a fourth set of instruction code for implementing the following functions;
generating a QEP for the given query;
exploiting statement execution statistics during the generation of a QEP;
assessing a generated QEP by considering statistical values about previous executions of said query according to said QEP;
determining whether to choose said QEP or to generate a new QEP;
executing said query according to the generated QEP; and
collecting statistical values during execution for optimizing an execution of future queries. - View Dependent Claims (18, 19, 20, 21, 22, 23)
-
Specification