Patent ID: 6931395

Claim:
A method for database query optimization in a computer system having a plurality of central processors, comprising the steps of: defining a plurality of logical partitions of said computer system, each logical partition having a respective processor resource assignment, wherein each task executing in said computer system is assigned to a respective one of said logical partitions and wherein the definition of a plurality of logical partitions may be dynamically altered; defining a database query; constructing a first search strategy for said database query, said first search strategy being dependent on a first processor resource assignment at the time said step of constructing a first search strategy is performed; invoking said database query for execution in a first logical partition, said invoking step being performed after said step of constructing a first search strategy; comparing a second processor resource assignment to said first processor resource assignment, said second processor resource assignment being associated with said first logical partition at the time said invoking said database query for execution step is performed; automatically constructing a second search strategy dependent on said second processor resource assignment, said step of automatically constructing a second search strategy being performed dependent on the results of said comparing step; saving said first search strategy in a persistent object for later execution, said saving step including saving said first processor resource assignment in said object; invoking a previously saved search strategy for execution in a second logical partition, said second logical partition being different from said first logical partition; identifying a third processor resource assignment associated with said second logical partition; comparing said third processor resource assignment to said first processor resource assignment; and automatically constructing a third search strategy for execution of said database query depending on the results of said comparing step.