473,396 Members | 1,864 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,396 software developers and data experts.

Profiler not reporting reads accurately

I am running a profiler trace against a database and noticed that the
reads column always shows 0. When running the same trace against
another machine I get back values in the reads column. I took a query
that profiler reported as having 0 reads and ran in in query analyzer
wtih STATISTICS IO on and confirmed that there are in fact reads:

Table 'tt_cawardalloc'. Scan count 1, logical reads 8, physical reads
0, read-ahead reads 1.
Table 'tt_clineitem'. Scan count 10, logical reads 125208, physical
reads 1540, read-ahead reads 2995.
Table 'tt_contractitem'. Scan count 32, logical reads 676, physical
reads 0, read-ahead reads 0.
Table 'tt_contract2'. Scan count 3, logical reads 121, physical reads
4, read-ahead reads 0.

I am on SQL 2000 sp3a. Any help appreciated.

Thanks!

Jul 23 '05 #1
8 2806
pa************@hotmail.com wrote:
I am running a profiler trace against a database and noticed that the
reads column always shows 0. When running the same trace against
another machine I get back values in the reads column. I took a query
that profiler reported as having 0 reads and ran in in query analyzer
wtih STATISTICS IO on and confirmed that there are in fact reads:

Table 'tt_cawardalloc'. Scan count 1, logical reads 8, physical reads
0, read-ahead reads 1.
Table 'tt_clineitem'. Scan count 10, logical reads 125208, physical
reads 1540, read-ahead reads 2995.
Table 'tt_contractitem'. Scan count 32, logical reads 676, physical
reads 0, read-ahead reads 0.
Table 'tt_contract2'. Scan count 3, logical reads 121, physical reads
4, read-ahead reads 0.

I am on SQL 2000 sp3a. Any help appreciated.

Thanks!


You can't compare the STATISTICS IO and Profiler Read counts as they
come from different places in SQL Server. That aside, what event are you
looking at to examine the reads in Profiler? And do you have the client
tools patched to the same service pack level on both PCs? You can check
this from the HELP | ABOUT screen in Profiler. Should read version 760
if on SP3.

--
David Gugick
Imceda Software
www.imceda.com

Jul 23 '05 #2
I am tracing SQL:BatchCompleted and SQL:StmtCompleted. I know that I
should expect some discrepancy between STATISTICTS IO and Profiler but
it's a huge difference between 0 and what STATISTICS IO is reporting.
Plus, *every* line in Profiler is reporting 0 reads (writes and CPU
seem to be OK though).

I checked the version of Profiler and it is correct, although it's not
a client problem because this happens when I do server side traces
using the tracing stored procs.

Thanks

Jul 23 '05 #3
pa************@hotmail.com wrote:
I am tracing SQL:BatchCompleted and SQL:StmtCompleted. I know that I
should expect some discrepancy between STATISTICTS IO and Profiler but
it's a huge difference between 0 and what STATISTICS IO is reporting.
Plus, *every* line in Profiler is reporting 0 reads (writes and CPU
seem to be OK though).

I checked the version of Profiler and it is correct, although it's not
a client problem because this happens when I do server side traces
using the tracing stored procs.

Thanks


What machine are you running this against. I haven't seen a problem with
Reads reporting incorrectly. There was a CPU reporting problem with the
RPC:Completed event that was recently patched and should be fixed by
SP4.

What server version and SP level are you running this against because it
now sounds like from what you've described that this is a server-issue
and not a client one.
--
David Gugick
Imceda Software
www.imceda.com

Jul 23 '05 #4
>I know that I should expect some discrepancy between STATISTICTS IO and
Profiler<
Why?

If a query requires x number of reads, why would you accept the fact that
different tools report different numbers for the same query?

I understand that these tools DO currently report different number, but in
my opinion, they shouldn't.

Regards,
Greg Linwood
SQL Server MVP

<pa************@hotmail.com> wrote in message
news:11*********************@l41g2000cwc.googlegro ups.com...I am tracing SQL:BatchCompleted and SQL:StmtCompleted. I know that I
should expect some discrepancy between STATISTICTS IO and Profiler but
it's a huge difference between 0 and what STATISTICS IO is reporting.
Plus, *every* line in Profiler is reporting 0 reads (writes and CPU
seem to be OK though).

I checked the version of Profiler and it is correct, although it's not
a client problem because this happens when I do server side traces
using the tracing stored procs.

Thanks

Jul 23 '05 #5
Greg Linwood wrote:
I know that I should expect some discrepancy between STATISTICTS IO
and Profiler<


Why?

If a query requires x number of reads, why would you accept the fact
that different tools report different numbers for the same query?

I understand that these tools DO currently report different number,
but in my opinion, they shouldn't.

Regards,
Greg Linwood
SQL Server MVP


Greg,

You probably won't find this helpful since you were a part of the thread
back in September, but Gert Drapers posted the following link that the
OP might find useful - despite it not adddressing the READ problem he is
seeing:

http://support.microsoft.com/default...B;EN-US;314648

Gert also added this:

"In statistics IO the logical read count represents the total number of
page
reads from the tables involved in the statement, both in-memory and disk
pages.

SQL Profiler, or better to say SQL Trace, the server side part which
does
the recording, read count represents the total number of page reads from
all
objects for executing the query, so this include system table access,
which
is not included in statistics IO.

Therefore you will find that when using statistics IO the count becomes
sort
of constant for a given query if all objects are in memory; while when
using
SQL Trace the count can still vary, because it counts all pages it needs
to
read in order to perform the query, so also reading of system tables to
check object existance, object access etc. Also running trace adds
overhead
which can cause additional read, for example the fact that you are
collecting the username for each event raised."

Orignal thread here:
http://www.sqlmonster.com/Uwe/Forum....Query-Analyzer
Having said that, it would be nice if all the tools reported the same
values...

--
David Gugick
Imceda Software
www.imceda.com

Jul 23 '05 #6
I have seen in rare cases when trace reported 0's when the performance
counters were blown away. A typical symptom would be if you did a select
against the sysprocesses table and all the waittypes show as Misc. If this
is the case then stop all monitoring of performance counters against that
machine and reboot it.

--
Andrew J. Kelly SQL MVP
<pa************@hotmail.com> wrote in message
news:11**********************@l41g2000cwc.googlegr oups.com...
I am running a profiler trace against a database and noticed that the
reads column always shows 0. When running the same trace against
another machine I get back values in the reads column. I took a query
that profiler reported as having 0 reads and ran in in query analyzer
wtih STATISTICS IO on and confirmed that there are in fact reads:

Table 'tt_cawardalloc'. Scan count 1, logical reads 8, physical reads
0, read-ahead reads 1.
Table 'tt_clineitem'. Scan count 10, logical reads 125208, physical
reads 1540, read-ahead reads 2995.
Table 'tt_contractitem'. Scan count 32, logical reads 676, physical
reads 0, read-ahead reads 0.
Table 'tt_contract2'. Scan count 3, logical reads 121, physical reads
4, read-ahead reads 0.

I am on SQL 2000 sp3a. Any help appreciated.

Thanks!

Jul 23 '05 #7
Andrew J. Kelly wrote:
I have seen in rare cases when trace reported 0's when the performance
counters were blown away. A typical symptom would be if you did a
select against the sysprocesses table and all the waittypes show as
Misc. If this is the case then stop all monitoring of performance
counters against that machine and reboot it.


Good to know Andrew. I'll keep that in mind if I see it reported again.
Thanks.

--
David Gugick
Imceda Software
www.imceda.com

Jul 23 '05 #8
The SQL Server perfmon counters are in fact missing from this box. I
will reinstall them and report back.

Jul 23 '05 #9

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

Similar topics

0
by: Jeff Mair | last post by:
Hello all, I haven't been using profiler for a terribly long time, and I've come across something that I just can't figure out. I'm running MS Virtual PC to run a Win2K Server OS with SQL...
6
by: P Jones | last post by:
Hi, I support an enterprise web application (IE client) built in VB6, with about 200 classes, serving about 7000 users, running on 3 clustered servers. I need to incorporate web reporting for...
9
by: Franco Gustavo | last post by:
Hi, All What's is the best .net profiler for Debug an application. I have to buy one but I don't know which one!! I tried some of them like Borland and AQTime. My big problem is, my...
3
by: Maansi Gupta | last post by:
Platform - Windows 2000 Professional , VC .NET 7.1 Hello, I have recently ported my source code from Visual Studio 6.0 to .NET 7.1 Previously with Visual Studio 6.0 I was using the profiler...
8
by: Bryan | last post by:
Does anyone have an example of an application that can connect to a running process and capture Trace.WriteLine calls like in SQL Server Profiler? I know that we can inherit from a TraceListener...
2
by: Brad Pears | last post by:
Has anyone used SQL Server Reporting Services to develop reports with using vb .net ?? We are wondering whether or not to stick with Crystal (hence purhcase the pro version of .net) or go with the...
10
by: SpreadTooThin | last post by:
I just did a loop ifstream i(myfile, ios::binary); while (!i.eof()) { i.read(buff, 2); } Well it should have come out of the loop but it tried to do the read
3
by: Sam Samson | last post by:
Can any-one recommend some good sites detailing how to code a simple memory profiler? How do they "look under the hood"? I built an uber simple service that tracks the process' memory but I need...
0
by: anweshadash | last post by:
Using SQL Profiler: (Ref: http://msdn2.microsoft.com/en-us/library/ms181091.aspx) Sometimes it’s very beneficial to use sql profiler. Let’s have an idea about that and how to use that by...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.