Re: Optimizer generates bad plans. - Mailing list pgsql-hackers

From Neil Conway
Subject Re: Optimizer generates bad plans.
Date
Msg-id 87admd8usw.fsf@mailbox.samurai.com
Whole thread Raw
In response to Optimizer generates bad plans.  (Kris Jurka <jurka@ejurka.com>)
Responses Re: Optimizer generates bad plans.
List pgsql-hackers
Kris Jurka <jurka@ejurka.com> writes:
> While adding schema support to the JDBC Driver, I came across a
> query which occasionally generates some spectacularly bad plans.

Interesting. The inconsistency you're seeing is a result of GEQO. I
would have hoped that it would have produced a better quality plan
more often, but apparently not. On my system, the regular query
optimizer handily beats GEQO for this query: it produces more
efficienty query plans 100% of the time and takes less time to do so.

For *this* query at least, raising geqo_threshold would be a good
idea, but that may not be true universally.

> I thought someone might be interested in a test case for the
> optimizer.

Thanks, it's a useful query -- I've been meaning to take a look at
GEQO for a while now...

Cheers,

Neil

-- 
Neil Conway <neilc@samurai.com> || PGP Key ID: DB3C29FC



pgsql-hackers by date:

Previous
From: Rod Taylor
Date:
Subject: Re: Optimizer generates bad plans.
Next
From: Kris Jurka
Date:
Subject: Re: Optimizer generates bad plans.