Dynamic optimization of prepared statements in a statement pool
First Claim
1. A computer implemented method of managing a statement pool, the method comprising:
- tracking usage of a plurality of statements in a statement pool utilized by a database;
selectively optimizing at least one of the statements from the statement pool based upon the tracked usage of the plurality of statements using at least one processor;
after selectively optimizing the statement, processing a request to access an unoptimized representation of the statement by accessing an optimized representation of the statement; and
executing a database query on the database using the optimized representation of the statement.
0 Assignments
0 Petitions
Accused Products
Abstract
An apparatus, program product and method dynamically optimize prepared statements resident in a statement pool to permit subsequent reuses of such statements to utilize the optimized representations of such statements. The optimization of pooled statements may be performed responsive to the tracked usage of the statements in a statement pool, to direct the overhead associated with such optimization to those statements that are more likely to be utilized in the future. Among a multitude of possible optimizations, a pooled statement that requests data in a format other than that utilized by the database being accessed may be modified to request the data in the format used by the database, thereby decreasing the overhead in the database associated with format conversions.
-
Citations
17 Claims
-
1. A computer implemented method of managing a statement pool, the method comprising:
-
tracking usage of a plurality of statements in a statement pool utilized by a database; selectively optimizing at least one of the statements from the statement pool based upon the tracked usage of the plurality of statements using at least one processor; after selectively optimizing the statement, processing a request to access an unoptimized representation of the statement by accessing an optimized representation of the statement; and executing a database query on the database using the optimized representation of the statement. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. An apparatus, comprising:
-
a processor; and program code configured to be executed by the processor to manage a statement pool utilized by a database by tracking usage of a plurality of statements in the statement pool and selectively optimizing at least one of the statements from the statement pool based upon the tracked usage of the plurality of statements, wherein the program code is further configured to, after selectively optimizing the statement, process a request to access an unoptimized representation of the statement by accessing an optimized representation of the statement, and wherein the program code is further configured to execute a database query on the database using the optimized representation of the statement. - View Dependent Claims (9, 10, 11, 12)
-
-
13. A program product, comprising:
-
program code configured to be executed by the processor to manage a statement pool utilized by a database by tracking usage of a plurality of statements in the statement pool and selectively optimizing at least one of the statements from the statement pool based upon the tracked usage of the plurality of statements, wherein the program code is further configured to, after selectively optimizing the statement, process a request to access an unoptimized representation of the statement by accessing an optimized representation of the statement, and wherein the program code is further configured to execute a database query on the database using the optimized representation of the statement; and a non-transitory recordable medium storing the program code. - View Dependent Claims (14, 15, 16, 17)
-
Specification