I am trying to delete many rows using primary key search.
e.g.
DELETE FROM t1 WHERE t1.pid IN (SELECT pid FROM ...);
Here pid
is primary key of table t1
but it is not using index in case of delete.
The inner query is returning too many rows so the whole query is taking too much time as outer one is not using index.
How can I delete those rows faster?