Re: Optimizer generates bad plans.

From: Kris Jurka <books(at)ejurka(dot)com>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Optimizer generates bad plans.
Date: 2002-09-19 22:31:57
Message-ID: Pine.LNX.4.33.0209191826370.15929-100000@leary.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Well I was really hoping pg_constraint would solve all my problems, but
since contrib/array is not installed by default the conkeys and confkeys
columns aren't terribly useful because they can't be joined to
pg_attribute.

Also there is not a column to tell you the unique constraint that
supports a given foreign key constraint.

See my post to bugs:

http://fts.postgresql.org/db/mw/msg.html?mid=1074855

Kris Jurka

On Thu, 19 Sep 2002, Bruce Momjian wrote:

>
> Congratulations. That is the largest plan I have ever seen. ;-)
>
> ---------------------------------------------------------------------------
>
> Kris Jurka wrote:
> > While adding schema support to the JDBC Driver, I came across a query
> > which occasionally generates some spectacularly bad plans. I have
> > attached the query and explain analyze outputs against today's cvs head
> > for queries that take between 9 and 845941 msec. In the JDBC Driver I
> > will specify a reasonable join order using explicit JOINs, but I thought
> > someone might be interested in a test case for the optimizer.
>
> --
> Bruce Momjian | http://candle.pha.pa.us
> pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
> + If your life is a hard drive, | 13 Roberts Road
> + Christ can be your backup. | Newtown Square, Pennsylvania 19073
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2002-09-19 22:34:27 Re: Optimizer generates bad plans.
Previous Message Tom Lane 2002-09-19 22:26:01 Re: Beta2 on Friday Morning (Was: Re: Open 7.3 items)