SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


A Simple Select, Update Query with where condition is taking much time


A Simple Select, Update Query with where condition is taking much time

Author
Message
dakshinamurthy-655138
dakshinamurthy-655138
Ten Centuries
Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)

Group: General Forum Members
Points: 1318 Visits: 1056
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
Chand00
Chand00
SSCommitted
SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)

Group: General Forum Members
Points: 1690 Visits: 1257
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

dakshinamurthy-655138
dakshinamurthy-655138
Ten Centuries
Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)

Group: General Forum Members
Points: 1318 Visits: 1056
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
Chand00
Chand00
SSCommitted
SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)

Group: General Forum Members
Points: 1690 Visits: 1257
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

dakshinamurthy-655138
dakshinamurthy-655138
Ten Centuries
Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)

Group: General Forum Members
Points: 1318 Visits: 1056
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
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search