Patent ID: 8135703

Claim:
A computer apparatus comprising: a first computer system comprising: at least one processor; a memory coupled to the at least one processor; a query governor file having global governor data where the global governor data includes a plurality of global governor thresholds for resource costs to execute a query, wherein the resource costs comprise at least one of the following: total run time of the query, total temporary storage, hard drive activity, and central processing unit cycles; a first query governor residing in the memory and executed by the at least one processor wherein the first query governor estimates a resource cost to execute the query on the first computer system; a database with a partitioned table located on a plurality of partitions; a second query governor on a second computer system associated with a target partition that is one of the plurality of partitions wherein the second query governor estimates a resource cost to execute the query on the second computer system; a communication mechanism between the first and second query governor; wherein the second query governor communicates the estimated resource cost to execute the query on the second computer system to the first query governor and wherein the first query governor determines a total cost by adding the estimated resource costs to execute the query on the first computer system and the estimated cost to execute the query on the second computer system, and wherein the first query governor determines whether the total cost to execute the query on the plurality of partitions exceeds a global governor threshold of the plurality of global governor thresholds, and allows access to the partitioned table when the total cost to execute the query on the plurality of partitions does not exceed the global governor threshold.