dimanche 21 décembre 2014

Simple DELETE, but complicated execution plan


When I run this delete:



DELETE FROM ETLHeaders WHERE ETLHeaderID < 32465870


...it deletes 39,157 rows. It should be simple because it is deleting on ETLHeaderID which is the clustered index and primary key. But (according to the execution plan) it seems to be hitting 361,190 rows and using other indexes.


Any ideas why and how I can speed up this DELETE?


Execution Plan and table schema here:



thanks





Aucun commentaire:

Enregistrer un commentaire