Postgres docs anbefaler at bruge array i stedet for IN og subquery. Dette burde virke meget hurtigere
DELETE FROM logtable
WHERE id = any (array(SELECT id FROM logtable ORDER BY timestamp LIMIT 10));
Dette og nogle andre tricks kan findes her
Postgres docs anbefaler at bruge array i stedet for IN og subquery. Dette burde virke meget hurtigere
DELETE FROM logtable
WHERE id = any (array(SELECT id FROM logtable ORDER BY timestamp LIMIT 10));
Dette og nogle andre tricks kan findes her