Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

A Simple Select, Update Query with where condition is taking much time Expand / Collapse
Author
Message
Posted Wednesday, February 18, 2009 9:27 PM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Yesterday @ 1:22 AM
Points: 330, Visits: 962
Hi,

In production database, i have few tables which are consuming much time or it goes out with time out for a simple select and update queries. Please suggest what and all i need to check and what has to be done to resolve this. As these fetching takes more time, the application gives time out error.

I have restarted the sql server and agents. I also tried with taking a full backup of the database, even after it has the same problem. Please suggest what and all i have to do to get rid out of this.


With Regards
Dakshina Murthy
Post #660032
Posted Wednesday, February 18, 2009 9:59 PM


Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Friday, July 25, 2014 12:52 PM
Points: 530, Visits: 1,134
Hi,

There may be no of reasons why it is happening.

1. Do you have indexes on those tables.
2. When did you update your indexes and statistics last.
3. Do you have any other processes or blockings while select or update is going on these tables
4. Did you study the query plan . you can find out what exactly is happening in your query plan if you dont have any blockings etc..


Thanks
Chandra Mohan N


Thanks
Chandra Mohan
Post #660038
Posted Wednesday, February 18, 2009 10:09 PM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Yesterday @ 1:22 AM
Points: 330, Visits: 962
1. Do you have indexes on those tables.

Answer: Yes we do have indexes on these tables,

2. When did you update your indexes and statistics last.

Answer: I have rebuild these indexes now.

3. Do you have any other processes or blockings while select or update is going on these tables

Answer: How to check whether any processes of blockings while select or update is going on these tables.

4. Did you study the query plan . you can find out what exactly is happening in your query plan if you dont have any blockings etc..

Answer: No, i havent studied the query plan. Please let me know how to study the execute plan.

Thanks for the help.

With Regards
Dakshina Murthy
Post #660042
Posted Wednesday, February 18, 2009 10:46 PM


Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Friday, July 25, 2014 12:52 PM
Points: 530, Visits: 1,134
Hi,

I am sorry to say that there may be some other problems too like locking mechanism etc... as this is performance related problem. Just check out sp_who2 while this is executing. And also are there any backup jobs or any other jobs executing in the background while this is happening. Studying execution plan will take more time but let me tell you this is the best one for beginners

http://www.sqlservercentral.com/articles/Administering/executionplans/1345/

http://www.sql-server-performance.com/tips/query_execution_plan_analysis_p2.aspx

Thanks
Chandra Mohan N


Thanks
Chandra Mohan
Post #660054
Posted Wednesday, February 18, 2009 11:07 PM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Yesterday @ 1:22 AM
Points: 330, Visits: 962
Hi,

Thanks a lot for the guidance and showing the way to learn, i am really happy, definitely i will read this.


Thank you very much

With Regards
Dakshina Murthy
Post #660064
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse