1. A method of performing a query of a database, the method comprising: receiving a database query, the database query including first and second operations respectively configured to generate first and second disjoint results sets from a dataspace; analyzing the database query to identify a set of attributes from the dataspace that are used by at least one of the first and second operations in the database query; and during execution of the database query, iteratively processing a plurality of records from the dataspace in a single pass, including, for each of the plurality of records, processing such record by retrieving the plurality of attributes for such record from the dataspace and performing each of the first and second operations on the record using the retrieved attributes for such record to build the first and second disjoint results sets.