Re: Optimizer Bug?

From: Peter Eisentraut <e99re41(at)DoCS(dot)UU(dot)SE>
To: "Mitterwald, Holger" <mittehlg(at)coi(dot)de>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: Optimizer Bug?
Date: 2000-05-30 11:53:26
Message-ID: Pine.GSO.4.02A.10005301350400.10362-100000@Leopard.DoCS.UU.SE
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Tue, 30 May 2000, Mitterwald, Holger wrote:

> If I execute the following statement:
> query: explain select k.name, t.lang from kneipe k, typ t where
> k.typ=t.typ;
> ProcessUtility: explain select k.name, t.lang from kneipe k, typ t where
> k.typ=t.typ;

> Seems ok to me, but if I insert a (huge) table which is nowhere
> referenced (here:"preis"), the
> following happens:
>
> query: explain select k.name, t.lang from kneipe k, typ t, preis p where
> k.typ=t.typ;

> The query takes up to 100 times longer although the table "preis" is not
> used at all.

Sure it's used. Just because it's not mentioned in the select list doesn't
mean it will be ignored completely. What you get here is a three-way join,
which is of course slower than a two way join.

--
Peter Eisentraut Sernanders väg 10:115
peter_e(at)gmx(dot)net 75262 Uppsala
http://yi.org/peter-e/ Sweden

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Mitterwald, Holger 2000-05-30 12:07:19 Re: Optimizer Bug?
Previous Message Mitterwald, Holger 2000-05-30 11:30:16 Optimizer Bug?