July 10, 2014 at 8:58 am
Hello everyone, i'm using sp_whoisactive to troubleshoot a perf problem. I'll probable be posting questions about the specific problem later but i want to make sure i have all the pieces before i do.
Anyways with sp_whoisactive i'm seeing huge # of reads and relatively small # of physical reads. Is this normal? for example the # of reads is 2,541,699,042 while the # of physical_reads is 1,586. What essentially is this telling me? I never see the wait_info column (null) so the query never seems to be waiting on anything.
July 10, 2014 at 9:03 am
Logical reads are reads from memory whereas physical reads are reads from disk.
If the queries are not waiting on anything then the next thing I would look at is the query execution plans. The queries are probably performing scans on large tables which would account for the high number of reads that you are seeing.
Have a look at the plans and see if appropriate indexes can be created to bring down the number of reads.
Andrew
July 29, 2014 at 12:37 am
If the indexes are created and/or it is still that high amount of reads, it could also meant that the Statistics is out of date, so the optimizer is not picking the most cost effective plan
July 29, 2014 at 7:57 pm
fkeuris (7/29/2014)
If the indexes are created and/or it is still that high amount of reads, it could also meant that the Statistics is out of date, so the optimizer is not picking the most cost effective plan
It could also be "normal". The 2 Billion reads is trivial on large systems especially if there's a lot of batch processing. SQL Server can't do a thing with data unless it's in memory. Some folks' goal is to have enough memory so that the whole database can live in memory which would mean that almost everything would be logical reads and very little would be physical.
Of course, it could also be because of the things you say or it could be just crap code. It could also be from regular rebuilds or reorgs of large tables, which is a "normal" thing, as well. The overall number of reads means very little unless you can identify the source and then the cause of those reads.
I'll emphasize the crap code possibility because I've regularly run into single procs that generate tens of billions (read that as tens of Terabytes of I/O) of reads either in a single run or in multiple very short runs that occur 10,000 times in short periods of time. All of those can be fixed.
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply