• Paul White NZ (4/20/2010)


    Including the trivial case where the table has one row, if the rows in the table fit on a single page, SQL Server has a perfectly 'efficient' way to retrieve the rows. That is why I said it depends on the number of rows.

    Yes, you are right. For a single page, or even just a few dozen pages, scanning the table is fast enough to be called "efficient". I did not consider that when phrasing the question.


    Hugo Kornelis, SQL Server/Data Platform MVP (2006-2016)
    Visit my SQL Server blog: https://sqlserverfast.com/blog/
    SQL Server Execution Plan Reference: https://sqlserverfast.com/epr/