Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2008-06-24
7
Medium Priority
?
273 Views
Last Modified: 2010-03-19
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?
0
Comment
Question by:rastafaray
  • 3
  • 2
6 Comments
 
LVL 75

Accepted Solution

by:
Aneesh Retnakaran earned 1000 total points
ID: 21859116
you need to check for the execution plan, and need to create proper indexes
0
 

Author Comment

by:rastafaray
ID: 21861102
can you plz provide more info as to how to "check for the execution plan + create proper indexes"

thank you
0
 
LVL 143

Assisted Solution

by:Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3] earned 1000 total points
ID: 21862819
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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:rastafaray
ID: 21862888
actually it is a View.   does that make a difference?
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 21863026
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
 

Author Comment

by:rastafaray
ID: 22234964
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

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

by Mark Wills Attending one of Rob Farley's seminars the other day, I heard the phrase "The Accidental DBA" and fell in love with it. It got me thinking about the plight of the newcomer to SQL Server...  So if you are the accidental DBA, or, simp…
In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Integration Management Part 2
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

879 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question