SQL Server insert performance

后端 未结 8 1253
终归单人心
终归单人心 2020-12-29 06:01

I have an insert query that gets generated like this

INSERT INTO InvoiceDetail (LegacyId,InvoiceId,DetailTypeId,Fee,FeeTax,Investigatorid,SalespersonId,Creat         


        
8条回答
  •  余生分开走
    2020-12-29 06:29

    Sounds like the inserts are causing SQL Server to recalculate the indexes. One possible solution would be to drop the index, perform the insert, and re-add the index. With your attempted solution, even if you tell it to ignore constraints, it will still need to keep the index updated.

提交回复
热议问题