Patent ID: 8234292

Claim:
A method of optimizing processing of a query specifying a maximum equality condition on an attribute of a table in a parallel processing system, comprising: receiving, by a processing module of a plurality of processing modules deployed in the parallel processing system, the query, wherein the processing module has a subset of rows of the table allocated thereto; initializing, by the processing module, a variable to maintain a local value of the attribute encountered by the processing module to a value that is less than a value that may be stored by the attribute; initializing, by the processing module, a result spool to maintain at least one row of the table having an attribute value that at least equals the variable; iteratively evaluating attribute values of the rows allocated to the processing module; determining to add a first row to the result spool responsive to determining the attribute value of the first row equals or exceeds the local value of the variable; completing evaluation of all rows allocated to the processing module; transmitting the local value of the variable to a central node; receiving, from the central node, a global maximum attribute value; comparing the global maximum value to the local value; determining the global maximum attribute value exceeds the local value; and deleting all rows from the result spool.