Re: Long-running DELETE...WHERE...

From: Jochem van Dieten <nomail(at)dev(dot)null>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: Long-running DELETE...WHERE...
Date: 2002-01-14 22:47:37
Message-ID: 3C436009.40204@dev.null
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2002-01-14 23:25:37 Re: nested inner join help
Previous Message Jeff Eckermann 2002-01-14 22:26:56 Re: Result sets from functions