Greetingstrying to insert 17million rows into my staging database is a crawl. I havePK nonclusteredexternal_id clusteredDF_created_by default constraint getdate()DF_created_by default constraint (suser_sname())DF_GUID default constraint (newsequentialid())I am doing insert into stgRelease(Field1,Field2,Field3,Field4,external_id)select Field1,Field2,Field3,Field4,external_idFrom xTableWhere external_id not in (select external_id from stgRelease)
I tried to do it in batches in a WHILE block but still a crawl. Do I need to drop some indexes and constraints?Any input would be much appreciated.If you don't have the passion to help people, you have no passion