Re: GEQO status?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Ed Loehr <eloehr(at)austin(dot)rr(dot)com>, pghackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: GEQO status?
Date: 2000-12-23 00:51:18
Message-ID: 22156.977532678@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> I've seen a number of bug reports that would indicate to me the GEQO works
> less than perfectly. I vividly recall how, while working on my own code,
> mere additions of dummy clauses like '... AND 5=5' altered query results
> in seemingly random ways.

The choices made by GEQO are intentionally random, so I would expect
variation in tuple output order even for repetitions of the identical
query. If you got a semantically different result, that would indeed
be a bug. But it would most likely be a bug in the core planner, since
GEQO has essentially no influence over whether the produced plan is
correct or not. GEQO merely forces specific choices of join order.
All else is in the core planner.

> That was admittedly quite a while ago, but the
> GEQO code hasn't changed since.

The planner has changed quite markedly over the past couple releases,
so I don't put a lot of stock in old anecdotes. Let's see a test case.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2000-12-23 01:00:19 Re: GEQO status?
Previous Message Tom Lane 2000-12-23 00:37:40 Re: Isn't init_irels() dangerous ?