There are many possible explanations for this. It may be that you have to accept it as the cost of making an improvement but it may be highlighting issues elsewhere in the system. Possible causes:
- Fragmentation of the table.
- Fragmentation of the physical database files.
- Poor choice of clustered index key.
- Large table with low percentage of its data in the buffer pool, requiring lots of physical IO to read.
- Lack of spare memory/io/cpu capacity to deal with this one off task on top of the normal workload.
- Index creation requiring tempdb for sorting but tempdb on same drive as data and or log files.
Your question is a little sparse on the details necessary to provide a conclusive answer. To start with, can you add the table DDL (including clustered index definition) to your question along with row counts and database size. Also, a description of the server spec (memory, cpu, drive configuration) and whether or not tempdb is on a separate array.
Next, the following will give us an indication of how your IO subsystem is performing.
DB_NAME(fs.database_id) AS [Database Name]
, CAST(io_stall_read_ms / (1.0 + num_of_reads) AS NUMERIC(10, 1)) AS [avg_read_stall_ms]
, CAST(io_stall_write_ms / (1.0 + num_of_writes) AS NUMERIC(10, 1)) AS [avg_write_stall_ms]
, io_stall_read_ms + io_stall_write_ms AS [io_stalls]
, num_of_reads + num_of_writes AS [total_io]
, CAST((io_stall_read_ms + io_stall_write_ms) / (1.0 + num_of_reads
+ num_of_writes) AS NUMERIC(10, 1)) AS [avg_io_stall_ms]
sys.dm_io_virtual_file_stats(NULL, NULL) AS fs
sys.master_files AS mf
ON fs.database_id = mf.database_id
AND fs.[file_id] = mf.[file_id]
The following will tell us how badly fragmented your existing indexes are. You may want to run this at a quiet time as it can impact on performance.
DB_NAME(database_id) AS [Database Name]
, OBJECT_NAME(ps.OBJECT_ID) AS [Object Name]
, i.name AS [Index Name]
sys.dm_db_index_physical_stats(DB_ID(), NULL, NULL, NULL, 'LIMITED') AS ps
sys.indexes AS i
ON ps.[object_id] = i.[object_id]
AND ps.index_id = i.index_id
database_id = DB_ID()
AND page_count > 500
avg_fragmentation_in_percent DESC ;