Usually the DB engine should automatically select the index to use based on query execution plans it builds. However, there are some pretty rare cases when you want to force the DB to use a specific index.

SELECT *
FROM Table WITH(INDEX(Index_Name))
FROM	dbo.tbTable01 WITH (NOLOCK, INDEX (IDX_tbTable01_bIsProcess))

Last modified: March 2, 2023

Author

Comments

Write a Reply or Comment