• Thanks for the input guys.

    Scott: Yes, they result in the exact same behaviour and execution plan. SQL uses the best index available to it.

    Greg: Absolutely, the fastest way of getting the number of rows is querying the sysindexes table about it. It's just that you can't be sure of this number being properly updated at any given time. I'm not 100% sure of this, but I think you can force SQL to update this value to make sure it is correct by running UPDATE STATISTICS. Also, use the column rowcnt instead of rows, rows is only there for backward compatibility.

    Chris Hedgate @ Apptus Technologies (http://www.apptus.se)

    http://www.sql.nu