1. An information retrieval method for optimizing a query, comprising: evaluating the query to identify a table and a predicate equating a column of the table to a sub-query that applies an aggregation function to the column to return an aggregate value for the column, the aggregate value for selecting at least one row from the table to produce a query result, the aggregation function comprising one of a minimum function and a maximum function; determining whether an index has not been created using the column of the table; and reforming the query as a sort function on the column in response to the evaluating and the determining, the sort function scanning the table once to provide the query result.