Systems and methods for sharing of execution plans for similar database statements
First Claim
1. A computer implemented method for reusing a data structure in which a compiled cursor is stored, comprising:
- receiving a database statement from a client;
analyzing the database statement;
determining if the database statement is optimally shareable, sub-optimally shareable or non-shareable based on the analysis;
searching server memory for a similar database statement; and
reusing the data structure compiled for the similar database statement to execute the database statement when a system parameter that is configurable to control data structure sharing is configured to enable data structure sharing for all shareable database statements.
2 Assignments
0 Petitions
Accused Products
Abstract
A database statement, such as a SQL text, reuses the execution plan compiled for a similar SQL text found in memory if the value of a system parameter is configured for cursor sharing among optimally shareable SQL texts and the SQL text is optimally shareable with the similar SQL text found in memory. Reuse also occurs if the value of a system parameter is configured for cursor sharing among all shareable SQL texts and the SQL text is suboptimally or optimally shareable with the similar SQL text found in memory. For SQL text that is non-shareable with a similar SQL text found in memory, no execution plan sharing takes place.
324 Citations
60 Claims
-
1. A computer implemented method for reusing a data structure in which a compiled cursor is stored, comprising:
-
receiving a database statement from a client; analyzing the database statement; determining if the database statement is optimally shareable, sub-optimally shareable or non-shareable based on the analysis; searching server memory for a similar database statement; and reusing the data structure compiled for the similar database statement to execute the database statement when a system parameter that is configurable to control data structure sharing is configured to enable data structure sharing for all shareable database statements. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. A computer implemented method for reusing a data structure in which a compiled cursor is stored, comprising:
-
receiving a database statement from a client; analyzing the database statement; determining if the database statement is optimally shareable, sub-optimally shareable or non-shareable based on the analysis; searching server memory for a similar database statement; and reusing the data structure compiled for the similar database statement to execute the database statement when a system parameter that is configurable to control data structure sharing is configured to enable data structure sharing only for optimally shareable database statements. - View Dependent Claims (9, 10, 11, 12, 13, 14)
-
-
15. A computer implemented method for reusing a data structure in which a compiled cursor is stored, comprising:
-
receiving a database statement from a client; analyzing the database statement; determining if the database statement is optimally shareable, sub-optimally shareable or non-shareable based on the analysis; searching server memory for an exact matching database statement if the statement is non-shareable; and executing the data structure compiled from said exact matching database statement if said exact matching database is found in said memory. - View Dependent Claims (16, 17, 18, 19, 20, 21)
-
-
22. A computer implemented system for sharing a data structure in which a compiled cursor is stored, comprising:
-
a server configured to accept a database statement from a client, analyze the database statement, and to determine if the database statement is optimally shareable, sub-optimally shareable, or non-shareable based on the analysis; a search engine for searching shared memory for a similar database statement; and a cursor sharing monitor for executing a data structure compiled for said similar database statement if the value of a system parameter is configured to enable data structure sharing, wherein the cursor sharing monitor reuses an execution plan of the data structure compiled for the similar database statement to execute the database statement only if the system parameter is configured to enable data structure sharing for all shareable database statements. - View Dependent Claims (23, 24, 25, 26, 27, 28, 29, 30)
-
-
31. A computer implemented system for sharing a data structure in which a compiled cursor is stored, comprising:
-
a server configured to accept a database statement from a client, analyze the database statement, and to determine if the database statement is optimally shareable, sub-optimally shareable, or non-shareable based on the analysis; a search engine for searching shared memory for a similar database statement; and a cursor sharing monitor for executing a data structure compiled for said similar database statement if the value of a system parameter is configured to enable data structure sharing, wherein the cursor sharing monitor reuses an execution plan of the data structure compiled for the similar database statement to execute the database statement only if the system parameter is configured to enable data structure sharing for all optimally shareable database statements. - View Dependent Claims (32, 33, 34, 35, 36, 37, 38, 39)
-
-
40. A computer program product embodied on computer readable medium, the computer readable medium having stored thereon a sequence of instructions which, when executed by a processor, causes the processor to execute a method for reusing a data structure in which a compiled cursor is stored, the method comprising:
-
receiving a database statement from a client; analyzing the database statement; determining if the database statement is optimally shareable, sub-optimally shareable, or non-shareable based on the analysis; searching server memory for a similar database statement; and reusing the data structure compiled for the similar database statement to execute the database statement when a system parameter that is configurable to control data structure sharing is configured to enable data structure sharing for all shareable database statements. - View Dependent Claims (41, 42, 43, 44, 45, 46)
-
-
47. A computer program product embodied on computer readable medium, the computer readable medium having stored thereon a sequence of instructions which, when executed by a processor, causes the processor to execute a method for reusing a data structure in which a compiled cursor is stored, the method comprising:
-
receiving a database statement from a client; analyzing the database statement; determining if the database statement is optimally shareable, sub-optimally shareable, or non-shareable based on the analysis; searching server memory for a similar database statement; and reusing the data structure compiled for the similar database statement to execute the database statement when a system parameter that is configurable to control data structure sharing is configured to enable data structure sharing only for optimally shareable database statements. - View Dependent Claims (48, 49, 50, 51, 52, 53)
-
-
54. A computer program product embodied on computer readable medium, the computer readable medium having stored thereon a sequence of instructions which, when executed by a processor, causes the processor to execute a method for reusing a data structure in which a compiled cursor is stored, the method comprising:
-
receiving a database statement from a client; analyzing the database statement; determining if the database statement is optimally shareable, sub-optimally shareable, or non-shareable based on the analysis; searching server memory for an exact matching database statement if the statement is non-shareable; and executing the data structure compiled from said exact matching database statement if said exact matching database statement is found in said memory. - View Dependent Claims (55, 56, 57, 58, 59, 60)
-
Specification