I am familiar with the indexing concepts from developer's perspective but new to creating and maintaining indexes.
Most of our indexes are created with SORT_IN_TEMPDB=On
option, which tells SQL Server to use tempdb
for the sorting operations involved during the indexing.
Using the tempdb
for indexing should
speed up the sorting and reduce some IO load from the user database by using tempdb resources instead.
I recently run into an index definition which had SORT_IN_TEMPDB=Off
, which tells the SQL server to sort in the user database.
Questions:
- Would not
SORT_IN_TEMPDB=off
slow down the user database because the sorting will be done using user database resources? - What factors generally contribute to the decision of using
SORT_IN_TEMPDB=off
?