regarding output of Set Statistics IO on

  • Hello I am running queries, in production to test the performance issues.

    This is what i get from the result of Set Statistics IO on

    Can somebody please shed somelight on how to tune a query .. looking into this.

    It runs for 9-10 mins now.. i want to reduce the time it takes..

    Table 'Visit'. Scan count 0, logical reads 298358, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.

    Table 'Result'. Scan count 75657, logical reads 502621, physical reads 51147, read-ahead reads 121834, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.

    Table '#60D4B2C0'. Scan count 1, logical reads 160, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.

  • post the actual execution plan of the query.

    post the create table definitions of the visit and result tables along with all the indexes.

    Please take a look at the two links in my signature on posting code and data, and also posting performance related problems for help of the above.

  • I'd start by getting rid of the table variable. Any more advice than that will need the stuff Anthony asked for.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

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

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