September 25, 2009 at 9:12 am
I am running a query on a Server1, first time it takes 20 sec to complete , second time it takes 7 sec
and
same query on a Server2 , first time it takes 25 sec to complete , second time it takes 29 sec
Why it is not caching on Server2?
September 25, 2009 at 11:37 am
I get very closely to check the Locks occurred to the table related to this Query and their wait times through profiler and check also type of this lock to get easily its causes which may be one of more than 85 cause.
[font="Arial Black"]Performance Guard[/font]
[font="Courier New"]Just ask me to get 0 sec for all queries[/font]
September 25, 2009 at 12:32 pm
Also, is the data exactly the same on both servers. Are you passing identical parameters on both servers. Assuming both of the above are yes, are the indexes and structures the same on both servers? Assuming yes again, are the statistics updated exactly the same way on both servers? Do both servers have the same CPU, the same Memory? Do both servers have identical loads? Is it possible that someone else was querying data at the same time as you and caused contention?
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
September 25, 2009 at 2:19 pm
1. server 1 & 2 are same cpu,memory,disk.
2. db schema,index same
3. index rebuilded & statistics updated.
4. no lock at both places..
how to check statistics are same at both places?
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply