The Multifunctioning DBA

Nov 25 2011   9:00PM GMT

Another Index to save the day

Colin Smith Colin Smith Profile: Colin Smith

I had a customer call and complain that a select distinct statement was taking over 10 minutes to run and they thought that was to long. The table they are running the query against does have over 600 million rows so it is not a small table but it is partitioned. So I started looking into it and I found that the column that they wanted the distinct values for was not indexed. I created that index and now I am down to under 2 minutes.  Proper indexing to the rescue again. Take a look at the queries that developers are complaining about and just see if you can do any optimization at the database level before tossing code back to them. 90% or more of the time it is code but that does not mean we can not try to help out.

 Comment on this Post

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when other members comment.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to: