×

Method and apparatus for re-evaluating execution strategy for a database query

  • US 8,046,354 B2
  • Filed: 09/30/2004
  • Issued: 10/25/2011
  • Est. Priority Date: 09/30/2004
  • Status: Expired due to Fees
First Claim
Patent Images

1. A method for executing a database query in a computer system, comprising the steps of:

  • invoking a database query, said database query containing at least one imported variable, said step of invoking a database query comprising specifying a respective value of each said at least one imported variable;

    automatically selecting a primary query execution strategy for executing the database query from among a plurality of different query execution strategies for executing the database query, each said query execution strategy being generated by an automated query optimizer and optimized for a different respective set of values of said at least one imported variable;

    executing said database query according to said primary execution strategy;

    automatically monitoring execution of said primary execution strategy while performing said execution step to detect a condition from the set of conditions consisting of;

    (a) a number of records evaluated using said primary execution strategy exceeds a high water mark, said high water mark being a dynamically maintained value indicating the highest number of records evaluated during any of previous successful executions of said primary execution strategy, and(b) a projected number of records to be evaluated using said primary execution strategy will be less than a low water mark, said projected number of records being projected during execution of said primary execution strategy using at least some results from execution of said primary execution strategy, said low water mark being a dynamically maintained value indicating the lowest number of records evaluated during any of previous successful executions of said primary execution strategy;

    responsive to detecting a condition from said set of conditions, automatically initiating an alternate execution strategy of said plurality of query execution strategies for executing said database query; and

    outputting results of executing said database query to a user.

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