ADAPTIVE CURSOR SHARING
First Claim
1. A method comprising:
- determining, using a first cursor sharing technique, which cursor to use to execute one or more queries that are semantically equivalent to a particular query;
generating statistics during execution of the one or more queries;
after executing the one or more queries and generating the statistics, determining whether the statistics satisfy a particular condition; and
in response to determining that the statistics satisfy the particular condition, using a second cursor sharing technique to determine which cursor to use to execute a subsequently-received query that is semantically equivalent to the particular query;
wherein the first cursor sharing technique is one of a first technique or a second technique;
wherein the second cursor sharing technique is the other of the first technique and the second technique.
1 Assignment
0 Petitions
Accused Products
Abstract
Techniques for sharing cursors are provided. When a new query is issued, a database server determines whether the new query is semantically equivalent to a previous query. If so, then database server computes statistics associated with the new query. Based on the statistics, the database server determines whether compiling the new query would produce an execution plan that satisfies certain criteria. If so, then the cursor is used to execute the new query. In another approach, one cursor sharing technique (CST) is used to determine which cursor to use to execute a first set of semantically-equivalent queries. Statistics are gathered during execution of the first set of queries. The database server determines, based on the statistics, when to switch from using the first CST to a different CST. The different CST is used to determine which cursor to use to execute a second set of queries that are semantically-equivalent to the first set.
36 Citations
16 Claims
-
1. A method comprising:
-
determining, using a first cursor sharing technique, which cursor to use to execute one or more queries that are semantically equivalent to a particular query; generating statistics during execution of the one or more queries; after executing the one or more queries and generating the statistics, determining whether the statistics satisfy a particular condition; and in response to determining that the statistics satisfy the particular condition, using a second cursor sharing technique to determine which cursor to use to execute a subsequently-received query that is semantically equivalent to the particular query; wherein the first cursor sharing technique is one of a first technique or a second technique; wherein the second cursor sharing technique is the other of the first technique and the second technique. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16)
-
Specification