1. A computer program product, comprising a non-transitory computer usable medium having a computer readable program code embodied therein, the computer readable program code adapted to be executed to implement a method for conditionally performing a query including an aggregate function, the method comprising: receiving a query including an aggregate function to be performed on a plurality of records; determining a number of the records associated with the performance of the aggregate function; and conditionally performing the query based on the number of the records.