How to measure the duration of a full table scan?

  • Hello all,

    we would like to measure how long a table scan on a specifc table takes.

    We have tried it with Select Count(*) from Table but then only the first column(s) are read.

    Select * from Table is not usable because it takes a long time for SSMS to display x million rows and does not show the actual time of the scan.

    Any ideas?

    Best Regards

  • select count(*) from table WITH (INDEX=0)

    That'll force a table scan instead of the usual scan of the smallest index that the optimiser prefers.

    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 2 posts - 1 through 1 (of 1 total)

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