Slow running Query in SQL 2005 - how to find the cause?

we've a slow running GRID in aspx page that is populated from a query in SQL 2005
slow running GRID = it takes 3 minutes for the GRID (10 rows / 10 columns) to populate (aspx pg to render)

how can we find the cause?
rastafarayAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
Aneesh RetnakaranConnect With a Mentor Database AdministratorCommented:
you need to check for the execution plan, and need to create proper indexes
0
 
rastafarayAuthor Commented:
can you plz provide more info as to how to "check for the execution plan + create proper indexes"

thank you
0
 
Guy Hengel [angelIII / a3]Connect With a Mentor Billing EngineerCommented:
in sql management studio, open a "new query" sheet, paste the sql you run in your report, then check the "include execution plan" menu under query, then run the query.
you will get, besides the returned data tab, another one, named "excution plan".
in there you can see graphically (you might post the image here), how the query was run.
0
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

 
rastafarayAuthor Commented:
actually it is a View.   does that make a difference?
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
yes and now. a view is still nothing else than a query, so running the query to get the execution plan will be just as fine as without a view.
yes, it can make a difference, especially if the view is complex and when you want to filter the views result later => some conditions will make that it can throw in the condition "inside the views" query, sometimes that's not possible.
0
 
rastafarayAuthor Commented:
is there a 3-rd part tool (free or commercial) that will show the slow queries/procedures?   i.e. a tool that will point out which part of the specific Stored Procedure code is causing the slow down
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.