1. A method of query optimization, 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.