×

Parallel, in-line, query capture database for real-time logging, monitoring and optimizer feedback

  • US 8,775,413 B2
  • Filed: 08/22/2008
  • Issued: 07/08/2014
  • Est. Priority Date: 06/30/2008
  • Status: Active Grant
First Claim
Patent Images

1. A computer-implemented method for optimizing a database query in a computer system, comprising:

  • generating one or more query execution plans for the database query in an optimizer, wherein each of the query execution plans is comprised of a plurality of steps;

    computing a total cost for each of the query execution plans in the optimizer using estimated cost information adjusted by actual cost information generated during execution of the query execution plans;

    selecting an optimal query execution plan in the optimizer from among the query execution plans, based on the computed total cost;

    storing the selected query execution plan in an in-line query capture database, wherein the in-line query capture database is used for parallel real-time logging, monitoring and feedback, and is used to maintain information about query execution plans in real-time, by using a dictionary to verify the query execution plans and authorization to perform the query execution plan, by using an index analysis to optimize access path selection, and by storing optimized data in a workload cache;

    scheduling the selected query execution plan for execution, based on service level goals, performance parameters for a priority scheduler, and an assignment of resources, wherein;

    the selected query execution plan is assigned to one or more workloads and to one or more priority classes based on service level goals, such that the workloads with similar performance requirements are assigned to the same priority classes,the priority scheduler selects queries from the workloads and priority classes for execution,the performance parameters are used by the priority scheduler to adjust weights that modify how the resources are assigned or how the workloads are executed,one or more real-time feedback mechanisms monitor system conditions, detect short-term and long-term deviations from the service level goals, and adjust the priority scheduler'"'"'s weights to modify how the resources are assigned or how the workloads are executed, andat least one of the real-time feedback mechanisms monitors the workgroups'"'"' performance against the workloads'"'"' rules to determine whether to delay incoming requests, depending on the workloads and the priority classes to which the incoming requests are assigned;

    executing at least some of the steps of the selected query execution plan, at run-time for the selected query execution plan, in order to retrieve data from a database stored on the computer system;

    monitoring the execution of the steps of the selected query execution plan, in order to generate the actual cost information;

    storing the actual cost information with the selected query execution plan in the in-line query capture database; and

    re-optimizing at least some remaining unexecuted steps of the selected query execution plan in the optimizer, in real-time during the run-time of the selected query execution plan,using the actual cost information stored with the selected query execution plan in the in-line query capture database, and then continuing with execution of the remaining unexecuted steps of the selected query execution plan.

View all claims
  • 1 Assignment
Timeline View
Assignment View
    ×
    ×