Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Execution Times vs Logical Reads/Scan Count Expand / Collapse
Author
Message
Posted Wednesday, October 30, 2013 3:32 AM


SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Tuesday, April 19, 2016 7:01 PM
Points: 268, Visits: 863
Hello guys,

I want to discuss about your experience what is better.

for example. I have procedure which has lot of logical reads also I modified
Before
Table 'Worktable'. Scan count 2, logical reads 1477,
Table 'TB_MASTER_MFD01'. Scan count 2, logical reads 40
Table 'TB_REINPUT'. Scan count 2, logical reads 114,
Table 'TB_WORK_ORDER_MFD01'. Scan count 2, logical reads 951,
Table 'TB_MASTER_MFD01'. Scan count 2, logical reads 39
Table 'TB_REINPUT'. Scan count 1, logical reads 33
Table 'TB_WORK_ORDER_MFD01'. Scan count 1, logical reads 948,
CPU time = 31 ms, elapsed time = 43 ms.


After optimize was better
Table 'Worktable'. Scan count 2, logical reads 876,
Table 'TB_MASTER_MFD01'. Scan count 2, logical reads 26
Table 'TB_REINPUT'. Scan count 2, logical reads 37,
Table 'TB_WORK_ORDER_MFD01'. Scan count 2, logical reads 19
Table 'TB_MASTER_MFD01'. Scan count 2, logical reads 24,
Table 'TB_REINPUT'. Scan count 1, logical reads 34,
Table 'TB_WORK_ORDER_MFD01'. Scan count 1, logical reads 14,
SQL Server Execution Times:
CPU time = 0 ms, elapsed time = 8 ms.


But I still investigate the WorkTable, because inside are inside select.. so for this select * from (select ... I use OPTION(RECOMPILE) and result is here
Table 'TB_MASTER_MFD01'. Scan count 7, logical reads 84,
Table 'TB_REINPUT'. Scan count 7, logical reads 14,
Table 'TB_WORK_ORDER_MFD01'. Scan count 2, logical reads 26,
Table 'TB_MASTER_MFD01'. Scan count 2, logical reads 25,
Table 'TB_REINPUT'. Scan count 1, logical reads 34,
Table 'TB_WORK_ORDER_MFD01'. Scan count 1, logical reads 15,
CPU time = 78 ms, elapsed time = 79 ms.



THIS procedure is in timer 1second ..

SO my point is WHAT IS BETTER FROM ANOTHER POINT OF VIEW, I PREFER LONG TIME ( because i think this is still short time ) THAN LOT OF LOGICAL READS, what do you think ?

Thank you for experience and discuss




How to post data/code on a forum to get the best help: Option 1 / Option 2
Post #1509695
Posted Thursday, October 31, 2013 4:40 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Friday, April 8, 2016 3:23 AM
Points: 2,849, Visits: 4,075
tony28 (10/30/2013)
SO my point is WHAT IS BETTER FROM ANOTHER POINT OF VIEW, I PREFER LONG TIME ( because i think this is still short time ) THAN LOT OF LOGICAL READS, what do you think ?
Logical reads means data is being read from buffer .. longer time means data (which is not available in buffer) is being read from disk. So what do you want ..every time physical reads (means data from disk ) ? why ?


-------Bhuvnesh----------
I work only to learn Sql Server...though my company pays me for getting their stuff done
Post #1510101
Posted Thursday, November 14, 2013 5:19 AM


SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Tuesday, April 19, 2016 7:01 PM
Points: 268, Visits: 863
I wanted to delete before, but i dont know where and how.. sorrz for spam



How to post data/code on a forum to get the best help: Option 1 / Option 2
Post #1514227
Posted Thursday, November 14, 2013 6:13 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Friday, April 8, 2016 3:23 AM
Points: 2,849, Visits: 4,075
Post cant be deleted.

-------Bhuvnesh----------
I work only to learn Sql Server...though my company pays me for getting their stuff done
Post #1514240
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse