I have a query like
DELETE from tablename where colname = value;
which takes awfully long time to execute. What could be the reason? I have
There could be several explanations as to why your query takes a long time:
SELECT NULL FROM tablename WHERE colname=:value FOR UPDATE NOWAIT
,ON DELETE TRIGGER
that does additional work,UNINDEXED REFERENCE CONSTRAINTS
pointing to this table (there is a script from AskTom that will help you determine if such unindexed foreign keys exist).