73. The machine-readable storage medium of claim 64 , wherein the one or more sequences of instructions further comprise instructions which, when executed by the one or more processors, cause the one or more processors to perform the step of determining the particular candidate identification technique from two or more candidate identification techniques that are available to a query-processing unit to process the query, wherein the two or more candidate identification techniques include an exhaustive query-processing technique that determines an initial set of candidate queries as all semantically equivalent queries that can be generated by the query-processing unit; and defines the set of candidate queries as all queries in the initial set of candidate queries; and chooses for the particular query a certain query that has a best cost of all queries in the initial set of candidate queries.
64. A machine-readable storage medium storing one or more sequences of instructions for processing a query, which instructions, when executed by one or more processors, cause the one or more processors to perform steps comprising: determining a set of candidate queries for the query based on a particular candidate identification technique; wherein the particular candidate identification technique identifies as candidate queries fewer than all semantically equivalent queries that are determinable from transformations of one or more query blocks in the query; determining costs for each candidate query of the set of candidate queries; choosing a particular query, from the set of candidate queries, based on costs for each query in the set of candidate queries; wherein each candidate query in the set of candidate queries is semantically equivalent to the query; and executing the particular query in response to a request to execute the query.