Patent ID: 7783661

Claim:
A method for database query optimization in a computer system, comprising the steps of: defining a database query; constructing a first search strategy for executing said database query in said computer system, said computer system having a plurality of logical partitions thereof, each logical partition having a respective resource assignment, each said resource assignment allocating respective selective one or more resources of said computer system to its corresponding logical partition, wherein each of a plurality of tasks executing in said computer system is assigned to a respective one of said logical partitions and restricted to using only the respective selective one or more resources allocated to the respective logical partition by its respective resource assignment, said first search strategy being dependent on a first resource assignment, said first resource assignment being the resource assignment corresponding to a logical partition with which said first search strategy is associated at the time of constructing said first search strategy for executing said database query in said computer system; 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; automatically comparing a second resource assignment to said first resource assignment, said second resource assignment being associated with said first logical partition at the time said invoking said database query for execution step is performed; and automatically constructing a second search strategy dependent on said second resource assignment, said step of automatically constructing a second search strategy being performed dependent on the results of said comparing step.