Execution Times vs Logical Reads/Scan Count

  • 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

  • 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;-)

  • I wanted to delete before, but i dont know where and how.. sorrz for spam

  • Post cant be deleted.

    -------Bhuvnesh----------
    I work only to learn Sql Server...though my company pays me for getting their stuff done;-)

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply