473,394 Members | 1,746 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Cumulative wait time on server replies ???

Hello all,

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?

TIA.

Yannick

PS I'm using SS2000 SP3 on NT4.0
Jul 20 '05 #1
4 7268
Yannick Turgeon (no****@nowhere.com) writes:
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?


Books Online says:

Cumulative amount of time the driver spent waiting for replies from the
server.

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.

Why your query is suddently slow, I have no idea, but if you have identical
plans on two servers with identical data (I assume!), 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.

--
Erland Sommarskog, SQL Server MVP, so****@algonet.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 20 '05 #2
> > 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

Jul 20 '05 #3
Yannick Turgeon (no****@nowhere.com) writes:
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


Books Online says that these two should be as low as possible,
preferably close to 0, but below 10 is OK. From this the 38% percent
of Extent Scan Fragmentation on Test is the most scary-looking.

In any case, this is not the answer to why your query runs so much
slower in production. However, if there are additional indexes for the
table, you should run SHOWCONTIG for these as well. The above is only
for the clustered index.

The only other possibility I can think of is that you have a blocking
issue in production. Rather than going for a cup of coffee next you're
waiting for the query, run an sp_who and see if the Blk column has
anything to offer.

--
Erland Sommarskog, SQL Server MVP, so****@algonet.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 20 '05 #4
Erland,

Thanks for your support. Yesterday I've restarted my server and the problem
is now solved. I'll look to defragment my indexes on this table and probably
some other too.

Yannick
Jul 20 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Matt Larkin | last post by:
I am pulling my hair out trying to solve this one (presumably because I am not particularly trained or skilled at access!) I have a query which summarises the variances that each of my sales...
1
by: Victor | last post by:
Hi There, I have a query witch gives me the following result: Period NumberOfItems 1 13 2 2 3 1 4 1 5 1
4
by: cefrancke | last post by:
Are there any ways to speed up a Cumulative sum in a query or perhaps another faster way to have a cumulative sum column (call a vba function?). For example, I want to sum up all values under...
15
by: Snuyt | last post by:
Hello, I want the program to wait a few seconds between executing code. It should look something like this: public sub xx() ...code... wait(2) 'wait 2 seconds ...code...
0
by: James Hallam | last post by:
I have searched through the news groups and found many threads close to what I want but cannot get any of them to work... I have a table with expenses and invoices, what I want is a bar chart...
3
ChaseCox
by: ChaseCox | last post by:
Hi all, I have a problem that I have been looking at for a couple days now and I can not quite get it to work. I would like to calculate the cumulative percent failure of a certain product in...
1
by: cbellew | last post by:
Hi guys, i'm looking to create a report with a table showing totals (running and cumulative) of education sessions attend by the staff at a hospital. I'm trying to get the table to show something...
1
by: justsam | last post by:
Hi Guys, can anybody help me to figure out how much sql server takes to process a query and in case application server is busy and due to that sql server is waiting to send the rsult to Application...
4
by: JAG | last post by:
The following line of code worked in my .hta prior to installing MS08-045 - Cumulative Security Update for Internet Explorer (953838) (on both XP and W2K): window.top.frames.location = ; After...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.