> > 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
is simply the consequences of something else.
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
older.
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.
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
Yannick