Showing posts with label statistics. Show all posts
Showing posts with label statistics. Show all posts

Wednesday, March 7, 2012

logical read vs actual row count

Hi

Can someone tell me what the difference between the logical read from statistics io and the actual row count from actual execution plan. I have a query that has the following

statistics io
Scan count 1, logical reads 484

actual execution plan
Clustered Index Seek
Actual Row Count : 40067

does this mean that sql has to read 484 pages from disk, and that 484 pages has over 40067 rows?

I wrote my query another way, and numbers becomes

statistics io
Scan count 1, logical reads 1207

actual execution plan
Clustered Index Seek
Actual Row Count : 133

the 1st query took about 2 seconds, but the seconds query took about 4 seconds. does this mean the logical read is more important

thanks

Paul


See SQL Server 2005 Books Online topics:
Reading Pages
http://msdn2.microsoft.com/en-us/library/ms191475.aspx

SET STATISTICS IO (Transact-SQL)
http://msdn2.microsoft.com/en-US/library/ms184361.aspx

logical read

Hi

I am trying to tune a sql query. The query return about 300 rows of uniqueindentifier. But in the statistics IO, I see Logical reads of 7228, that does not seems right? I tried to rebuild the index, but the logical read did not help. But I set up the database on another computer, and the IO on this on came down to 10. Is there something wrong with the computer with logical read of 7228

thanks

Pauli

There may not be enough memory available to SQL Server, and the data cache is being flushed.

What is the memory/load differences between the two computers?

|||Are the indexes the same in both databases? It really sounds like you are missing an index in the first database. Even on a machine with memory pressure, that much of a difference in logical IO's points at an index or statistics problem. Are you seeing physical reads when you run the query in the first database?