Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

quick sp_whoisactive question? Expand / Collapse
Author
Message
Posted Thursday, July 10, 2014 8:58 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Tuesday, August 19, 2014 11:58 AM
Points: 10, Visits: 33
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.
Post #1591204
Posted Thursday, July 10, 2014 9:03 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Today @ 6:59 AM
Points: 1,244, Visits: 1,016
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
Post #1591208
Posted Tuesday, July 29, 2014 12:37 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Yesterday @ 1:03 AM
Points: 1, Visits: 67
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
Post #1597160
Posted Tuesday, July 29, 2014 7:57 PM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: General Forum Members
Last Login: Yesterday @ 8:46 PM
Points: 35,218, Visits: 31,676
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
"RBAR is pronounced "ree-bar" and is a "Modenism" for "Row-By-Agonizing-Row".

First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column."

(play on words) "Just because you CAN do something in T-SQL, doesn't mean you SHOULDN'T." --22 Aug 2013

Helpful Links:
How to post code problems
How to post performance problems
Post #1597550
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse