• Thanks for this suggestion.

    I managed to find a workaround for this. The original ID column was a varchar column with a mixsture of INTs and GUIDs (that's how the data was supplied) so I created a new table and added an IDENTITY column then indxed the column. I am now using this new ID in my EXISTS clause.

    After inserting 10 million rows as an initial load I can now do 10k rows in 2 seconds.

    ---------------------------------------------------------

    It takes a minimal capacity for rational thought to see that the corporate 'free press' is a structurally irrational and biased, and extremely violent, system of elite propaganda.
    David Edwards - Media lens[/url]

    Society has varying and conflicting interests; what is called objectivity is the disguise of one of these interests - that of neutrality. But neutrality is a fiction in an unneutral world. There are victims, there are executioners, and there are bystanders... and the 'objectivity' of the bystander calls for inaction while other heads fall.
    Howard Zinn