Automatic recognition and capture of SQL execution plans
First Claim
1. A method for executing database commands, the method comprising:
- receiving a plurality of requests from a plurality of database clients, the plurality of requests requesting execution of a plurality of database commands;
executing the plurality of database commands according to plans identified for the plurality of database commands;
while executing the plurality of database commands according to the plans, collecting first information, wherein the first information is related to execution of the plurality of database commands according to the plans;
for each database command in the plurality of database commands, determining whether the database command matches one or more pre-defined criteria;
when it is determined that a database command, of the plurality of database commands, matches the one or more pre-defined criteria, persistently recording, in historical information for the database command, information collected in relationship with execution of the database command;
when it is determined that a database command, of the plurality of database commands, does not match the one or more pre-defined criteria, not persistently recording, in historical information for the database command, the information collected in relationship with execution of the database command;
receiving a particular request to execute a previously executed database command of the plurality of database commands;
in response to the particular request;
determining that information collected in relationship with one or more previous executions of the previously executed database command has been persistently recorded in historical information for the previously executed database command; and
executing the previously executed database command using, at least in part, the information collected in relationship with the execution of the previously executed database command;
wherein the steps are performed by one or more computing devices.
1 Assignment
0 Petitions
Accused Products
Abstract
Approaches, techniques, and mechanisms are disclosed for capturing and utilizing information related to query plans exhibiting interesting characteristics. A database server receives a request to execute a command. The database server executes the command according to a query plan. In response to determining that the command matches one or more pre-defined criteria, the database server captures information related to the execution of the first command. The criteria may include, for example, whether or not the command is repeatable, the existence of bind variables, access of a particular object, high resource utilization, receipt from a particular user, client, or application, etc. The information recorded may include, for example, performance statistics collected during execution of the first plan, data indicating the execution context during execution of the first plan, and properties of the first plan. The recorded information may subsequently be utilized by the database server in executing other database other database commands.
-
Citations
32 Claims
-
1. A method for executing database commands, the method comprising:
-
receiving a plurality of requests from a plurality of database clients, the plurality of requests requesting execution of a plurality of database commands; executing the plurality of database commands according to plans identified for the plurality of database commands; while executing the plurality of database commands according to the plans, collecting first information, wherein the first information is related to execution of the plurality of database commands according to the plans; for each database command in the plurality of database commands, determining whether the database command matches one or more pre-defined criteria; when it is determined that a database command, of the plurality of database commands, matches the one or more pre-defined criteria, persistently recording, in historical information for the database command, information collected in relationship with execution of the database command; when it is determined that a database command, of the plurality of database commands, does not match the one or more pre-defined criteria, not persistently recording, in historical information for the database command, the information collected in relationship with execution of the database command; receiving a particular request to execute a previously executed database command of the plurality of database commands; in response to the particular request; determining that information collected in relationship with one or more previous executions of the previously executed database command has been persistently recorded in historical information for the previously executed database command; and executing the previously executed database command using, at least in part, the information collected in relationship with the execution of the previously executed database command; wherein the steps are performed by one or more computing devices. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13)
-
-
14. A method for executing database commands, the method comprising:
-
receiving a plurality of requests from a plurality of database clients, the plurality of requests requesting execution of a plurality of database commands; for each database command in the plurality of database commands, determining whether the database command matches one or more pre-defined criteria; executing the plurality of database commands according to plans identified for the plurality database commands; when it is determined that a database command, of the plurality of database commands, matches the one or more pre-defined criteria, monitoring execution of the database command and capturing performance statistics related to the execution of the database command in historical information for the database command; when it is determined that a database command, of the plurality of database commands, does not match the one or more pre-defined criteria, not capturing performance statistics related to the execution of the database command in historical information for the database command; generating a report for one or more of the plans, based on performance statistics captured in historical information for a corresponding one or more of the plurality of database commands; wherein the steps are performed by one or more computing devices. - View Dependent Claims (15, 16)
-
-
17. A non-transitory computer-readable storage medium storing one or more sequences of instructions which, when executed by one or more processors, causes the one or more processors to perform:
-
receiving a plurality of requests from a plurality of database clients, the plurality of requests requesting execution of a plurality of database commands; executing the plurality of database commands according to plans identified for the plurality of database commands; while executing the plurality of database commands according to the plans, collecting first information, wherein the first information is related to execution of the plurality of database commands according to the plans; for each database command in the plurality of database commands, determining whether the database command matches one or more pre-defined criteria; when it is determined that a database command, of the plurality of database commands, matches the one or more pre-defined criteria, persistently recording, in historical information for the database command, information collected in relationship with execution of the database command; when it is determined that a database command, of the plurality of database commands, does not match the one or more pre-defined criteria, not persistently recording, in historical information for the database command, the information collected in relationship with execution of the database command; receiving a particular request to execute a previously executed database command of the plurality of database commands; in response to the particular request; determining that information collected in relationship with one or more previous executions of the previously executed database command has been persistently recorded in historical information for the previously executed database command; and executing the previously executed database command using, at least in part, the information collected in relationship with the execution of the previously executed database command. - View Dependent Claims (18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29)
-
-
30. A non-transitory computer-readable storage medium storing one or more sequences of instructions which, when executed by one or more processors, causes the one or more processors to perform:
-
receiving a plurality of requests from a plurality of database clients, the plurality of requests requesting execution of a plurality of database commands; for each database command in the plurality of database commands, determining whether the database command matches one or more pre-defined criteria; executing the plurality of database commands according to plans identified for the plurality database commands; when it is determined that a database command, of the plurality of database commands, matches the one or more pre-defined criteria, monitoring execution of the database command and capturing performance statistics related to the execution of the database command in historical information for the database command; when it is determined that a database command, of the plurality of database commands, does not match the one or more pre-defined criteria, not capturing performance statistics related to the execution of the database command in historical information for the database command; generating a report for one or more of the plans, based on performance statistics captured in historical information for a corresponding one or more of the plurality of database commands. - View Dependent Claims (31, 32)
-
Specification