Showing posts with label index sql server. Show all posts
Showing posts with label index sql server. Show all posts

Thursday, October 23, 2008

Force SQL Server to use index

If your table has too many indexes, then I figured out that it is better to force your SQL Server query to use the index which is made for that particular query.

To force the use of index,

SELECT *
FROM tablename WITH (INDEX = IDX_1234)
WHERE Column1 = 'value'

In this example IDX_1234 is the name of the Index.

About Us