I\'m currently doing some testing to determine the performance implications of including an index on a given column in SQL Server 2005.
The test data set I\'m using
SELECT *
FROM MyTable WITH (INDEX(0))
WHERE MyIndexedColumn = 0
Query would normally use the index on MyIndexedColumn, but due to the table hint, it will instead tablescan.
SELECT *
FROM MyTable WITH (INDEX(IndexName))
WHERE MyIndexedColumn = 0
Query would normally use the index on MyIndexedColumn, but due to the table hint, it will instead use the index named IndexName.