That is a fairly loaded question. First you should look at the current efficiency of the query to see that it is structured that it is pulling back the minimal amount of data needed. Ensure that the query is utilizing the proper existing indexes or that there are proper indexes in place to support the query. There are lots of opportunities within the query itself to also optimize in many cases to use joins properly, avoid costly operations etc. If you were able to post the query then myself and others could help determine if you are doing anything less efficient.