Hi @SQLServerBro,
>My question is disbling vs dropping indexes (and enabling / creating after bulk insert) which operation will give me best insert performance? will they both same from performance standpoint?
Disabling a clustered index has additional effects. The data in the table still exists, but will be inaccessible for anything other than a drop or rebuild operation. All related nonclustered indexes and views are also unavailable. Foreign key constraints that reference the table are disabled. Queries against the table will fail.
Disabling a nonclustered index will deallocate the index pages – the space is freed in the database.
The biggest difference between disabling and dropping a nonclustered index is whether the index definition stays around.
To disable in index, issue an ALTER INDEX command.
ALTER INDEX IX_IndexName ON Schema.TableName DISABLE;
GO
If you want to re-enable the index, you need to rebuild it – there is no ALTER INDEX…ENABLE command. The rebuild works like this:
ALTER INDEX IX_IndexName ON Schema.TableName REBUILD;
GO
To drop a clustered or nonclustered index, issue a DROP INDEX command.
DROP INDEX IndexName ON Schema.TableName;
GO
Refer to the bog What’s Better: Disabling vs. Dropping Indexes?
>second question is im not planning on dropping or disabling clustered indexes as i believe it will not give me performance improvement since clustered indexes are same as heap tables without index on it. Let me know if my understanding is correct.
No. Removing indexes prior to large inserts on a table, including when using SQL Bulk Insert, may be a best practice to increase performance.
Refer to the old thread what are sql server index disable advantages?
If the response is helpful, please click "Accept Answer" and upvote it, as this could help other community members looking for similar queries.