Re: Long-running DELETE...WHERE... - Mailing list pgsql-sql

From Jochem van Dieten
Subject Re: Long-running DELETE...WHERE...
Date
Msg-id 3C436009.40204@dev.null
Whole thread Raw
In response to Long-running DELETE...WHERE...  (jboes@nexcerpt.com (Jeff Boes))
List pgsql-sql
Jeff Boes wrote:

> Why would a delete involving a subselect run so much longer than the
> individual delete commands?


Some SQL statements are faster than others. Try to rewrite your query to 
use EXISTS instead of IN and see if it makes any difference. I would 
recommend using EXPLAIN to find out what PostgreSQL is really doing and 
optimize from there.

jochem



pgsql-sql by date:

Previous
From: Marius Andreiana
Date:
Subject: psql bug: copy paste statements looses tab character
Next
From: "Glenn MacGregor"
Date:
Subject: pqFlush problem