Table with 2000 records - Clustered Scan or Index Scan?

  • For a table with 2000 records which one would be better, clustered scan or index scan?

  • It's not a question of what's better, it's a question of what's possible.

    If you're retrieving all columns, all rows, then a table scan (clustered index scan) is the only option. If you're retrieving a portion of the rows, an index seek would likely be better.

    But everything's fast on 2000 rows.

    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
  • When you say Clustered Scan or Index Scan, as Gail already mentioned, a Clustered Scan is a Clustered Index Scan / Table Scan. You can also have Index Scans on non-clustered indexes. But if you have an Index Scan on a NC Index, it's better to tweak it so it becomes an Index Seek, if you can.

    Gail covered everything else in her answer, including the speed issue, so I'll just say "It depends" and "ditto" at this point.

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

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

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