I have a query like
DELETE from tablename where colname = value;
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 TRIGGERthat does additional work,
UNINDEXED REFERENCE CONSTRAINTSpointing to this table (there is a script from AskTom that will help you determine if such unindexed foreign keys exist).