Re: UPDATE with JOIN not using index

From: Arnaud Lesauvage <arnaud(dot)listes(at)codata(dot)eu>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Richard Huxton <dev(at)archonet(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: UPDATE with JOIN not using index
Date: 2010-03-16 16:03:46
Message-ID: 4B9FABE2.7000509@codata.eu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Le 16/03/2010 16:52, Tom Lane a écrit :
> Sometime in the future they might generate the same plan. Right now the
> planner's ability to optimize sub-SELECTs is pretty limited, and so you
> typically get a nestloop-like plan even if some other join style would
> be faster.

OK, thanks for the clarification.
Should joins always be considered better than subselects then ?

I like the readability of subselects and I think I use them more often
than joins when I have the choice, so maybe I should check and change
all my queries ?

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Peter Schmidtke 2010-03-16 17:06:55 Re: reuse data in existing data directory
Previous Message Tom Lane 2010-03-16 15:52:25 Re: UPDATE with JOIN not using index