Solved

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

Posted on 2008-06-24
7
270 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
7 Comments
 
LVL 75

Accepted Solution

by:
Aneesh Retnakaran earned 250 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 250 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
Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

 

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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

So every once in a while at work I am asked to export data from one table and insert it into another on a different server.  I hate doing this.  There's so many different tables and data types.  Some column data needs quoted and some doesn't.  What …
Data architecture is an important aspect in Software as a Service (SaaS) delivery model. This article is a study on the database of a single-tenant application that could be extended to support multiple tenants. The application is web-based develope…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

615 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