Re: Optimizer generates bad plans.

From: Neil Conway <neilc(at)samurai(dot)com>
To: Kris Jurka <jurka(at)ejurka(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Optimizer generates bad plans.
Date: 2002-09-19 22:43:27
Message-ID: 87admd8usw.fsf@mailbox.samurai.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Kris Jurka <jurka(at)ejurka(dot)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(at)samurai(dot)com> || PGP Key ID: DB3C29FC

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kris Jurka 2002-09-19 22:52:03 Re: Optimizer generates bad plans.
Previous Message Rod Taylor 2002-09-19 22:40:17 Re: Optimizer generates bad plans.