Re: Performance of full outer join in 8.3 - Mailing list pgsql-general

From Simon Riggs
Subject Re: Performance of full outer join in 8.3
Date
Msg-id 1239798340.23905.21.camel@ebony.2ndQuadrant
Whole thread Raw
In response to Re: Performance of full outer join in 8.3  (Christian Schröder <cs@deriva.de>)
Responses Re: Performance of full outer join in 8.3
List pgsql-general
On Wed, 2009-04-15 at 14:04 +0200, Christian Schröder wrote:
> Grzegorz Jaśkiewicz wrote:
> > set work_mem=24000; before running the query.
> >
> > postgres is doing merge and sort on disc, that's always slow.
> >
> Ok, but why is the plan different in 8.2? As you can see the same query
> is really fast in 8.2, but slow in 8.3.

The cost of the query seems accurate, so the absence of
attachment_isins_attachment_idx on the 8.3 plan looks to be the reason.
There's no way it would choose to scan 8115133 rows on the pkey if the
other index was available and usable.

--
 Simon Riggs           www.2ndQuadrant.com
 PostgreSQL Training, Services and Support


pgsql-general by date:

Previous
From: Grzegorz Jaśkiewicz
Date:
Subject: Re: Performance of full outer join in 8.3
Next
From: Grzegorz Jaśkiewicz
Date:
Subject: Re: Performance of full outer join in 8.3