Solved

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

Posted on 2008-06-24
7
268 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
Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

 

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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

I am showing a way to read/import the excel data in table using SQL server 2005... Suppose there is an Excel file "Book1" at location "C:\temp" with column "First Name" and "Last Name". Now to import this Excel data into the table, we will use…
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

739 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