DELETE query taking too long

Is there any quicker way of doing this…

DELETE FROM ActiveProducts WHERE sku NOT IN (SELECT sku FROM XMLImport);

There are 23,000 records in each table, but the query table about 3 minute to complete.

How frequent is the query run? Is there any index in place for the sku field in the XMLImport table?

1 Like

Hi Space,

I do remember setting an index on the field but when I come to look it was missing.

Ran the query again and it takes about half a second now :smile:

Thanks

1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.