SQL Server Performance

Query with better performance...

Discussion in 'SQL Server 2005 T-SQL Performance Tuning' started by Ritu, Mar 27, 2008.

  1. Ritu New Member

    Hi,
    Here are the statistics of two queries doing the same thing. which query will give better performance:
    a) Table
    'abc'. Scan count 1, logical reads 116823, physical reads 2, read-ahead reads 116809, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.Table
    'xyz'. Scan count 1, logical reads 10275, physical reads 3, read-ahead reads 10271, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
    b)Table
    'xyz'. Scan count 2, logical reads 10278, physical reads 6, read-ahead reads 9810, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.Table
    'abc'. Scan count 1, logical reads 116823, physical reads 2, read-ahead reads 116809, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
    Regards,
  2. Luis Martin Moderator

    Home work?
    As you can see statistics for table 'abc' are exactly the same.
    About 'xyz' are almost the same. Now, to be honest, 1 more scan count, 3 more logical reads and about 400 less read-ahead is not a big reason to said b) query is the best. Let said b) work with a very little more performance than a).
    I'm assuming clean buffers after and before each query.

Share This Page