9. The system of claim 8 , wherein the complexity measure of the client query is calculated using at least one of a type of operators, a number of operators in the client query or a number of sub-queries.
8. A system comprising: a processor; a computer readable medium communicatively coupled to the processor; and computer-executable instructions encoded in the computer readable medium, the instructions, when executed by the processor, operable to perform operations comprising: comparing a complexity measure of a client query received from a client application to a predetermined threshold, wherein the predetermined threshold is determined based on query execution data collected from a previous query; generating an optimized query by automatically modifying the client query without user input to reduce the complexity measure of the client query if the complexity measure of the client query exceeds the predetermined threshold; submitting the optimized query to a server application on a server; selecting a post-processing routine to be applied to a result set of the optimized query; applying the post-processing routine to the result set of the optimized query to generate a filtered result set; and forwarding the filtered result set to the client application.