Re: Why are queries with subselects so slow?

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Robert Wille <robertw(at)willeweb(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Why are queries with subselects so slow?
Date: 2003-03-07 06:23:07
Message-ID: 20030307062307.GH22303@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Mar 06, 2003 at 10:38:09PM -0700, Robert Wille wrote:
> I am trying to execute an update that has a subselect, and it takes an extraordinarily long time.
> By performing the subselect in my application, and issuing the update multiple times, it appears that I can do the entire update about 400 times faster.

Try using EXISTS rather than IN. It tends to work better.

Hope this helps,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> Support bacteria! They're the only culture some people have.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Mr.F 2003-03-07 06:46:01 New Interface for Win
Previous Message valerian 2003-03-07 06:01:08 Re: index on lower(column) is very slow