Patent ID: 7698253

Claim:
A method of processing a query in a database management system, the method comprising: (a) generating a preferred access path for a query with at least one variable at an initial execution of said query, wherein said preferred access path is generated based upon a first value for each variable in the query assigned during the initial execution of said query; (b) storing information related to said query, said first value for each variable and said preferred access path; (c) subsequently executing said query with a second value for each said variable assigned during the subsequent execution of said query and comparing the stored information related to said first value for each variable with information related to said second value for each variable; and (d) regenerating said preferred access path for said query in response to said comparison indicating that said information related to said second value assigned during said subsequent execution of said query differs sufficiently from said stored information related to said first value assigned during said initial execution of said query to enable generation of an access path different than said preferred access path.