![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I've got a query which suddently became very slow. It now takes about 10 secs instead of 2 secs. I've got to identical DB (one is for test and the other is production). The query is slow only in production. When running this query in both DB and looking at execution plan, statistics, etc, the onle difference is the Cumulative wait time on server replies. In test DB, I get the value: 2200 And in production DB: 1.22344e+009 What does this mean concretly? What do I have to do to solve this problem? |
#3
| ||||
| ||||
|
|
In test DB, I get the value: 2200 And in production DB: 1.22344e+009 What does this mean concretly? What do I have to do to solve this problem? I would suppose that if you have had that query window open for a long time, this number becomes quite high. I doubt that it has anything to do with the slowness of your query. It corresponds quite acuratly with the time I'm waiting though. But maybe it |
|
Why your query is suddently slow, I have no idea, but if you have identical plans Yes they are. |
|
on two servers with identical data (I assume!), On the same server with data slightly different: Test env. being 1 or 2 days |
|
then maybe you should check so that there is no other activity on the production machine. DBCC SHOWCONTIG on the involved tables may show some difference in fragmentation. |
#4
| |||
| |||
|
|
Test ------------ DBCC SHOWCONTIG scanning 'ReservationTravaux' table... Table: 'ReservationTravaux' (1920725895); index ID: 1, database ID: 8 TABLE level scan performed. - Pages Scanned................................: 158 - Extents Scanned..............................: 21 - Extent Switches..............................: 20 - Avg. Pages per Extent........................: 7.5 - Scan Density [Best Count:Actual Count].......: 95.24% [20:21] - Logical Scan Fragmentation ..................: 0.63% - Extent Scan Fragmentation ...................: 38.10% - Avg. Bytes Free per Page.....................: 808.3 - Avg. Page Density (full).....................: 90.01% Production ------------ DBCC SHOWCONTIG scanning 'ReservationTravaux' table... Table: 'ReservationTravaux' (1920725895); index ID: 1, database ID: 7 TABLE level scan performed. - Pages Scanned................................: 165 - Extents Scanned..............................: 21 - Extent Switches..............................: 20 - Avg. Pages per Extent........................: 7.9 - Scan Density [Best Count:Actual Count].......: 100.00% [21:21] - Logical Scan Fragmentation ..................: 7.88% - Extent Scan Fragmentation ...................: 19.05% - Avg. Bytes Free per Page.....................: 786.1 - Avg. Page Density (full).....................: 90.29% What do you think about that? Looks like there are a lot of differences between only those two values: - Logical Scan Fragmentation - Extent Scan Fragmentation |
#5
| |||
| |||
|
![]() |
| Thread Tools | |
| Display Modes | |
| |