From: | Martijn van Oosterhout <kleptog(at)svana(dot)org> |
---|---|
To: | Eric Schwarzenbach <Eric(dot)J(dot)Schwarzenbach(dot)C88(at)alumni(dot)upenn(dot)edu> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: [Fwd: Re: GEQO randomness?] |
Date: | 2008-11-05 07:31:20 |
Message-ID: | 20081105073120.GA21587@svana.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Fri, Oct 31, 2008 at 06:57:25PM -0400, Eric Schwarzenbach wrote:
>
> My problem with GEQO using a random number generator is that
> non-deterministic behavior is really hard to debug, and problems can go
> undiagnosed for ages. Frankly I would rather something fail all the
> time, than it work most of the time and fail just now and then. Never
> getting a good plan for a query would be an improvement because I would
> immediately be aware there's a problem and be forced to something about
> it, as opposed to maybe realizing there is going to *sometimes* be a
> problem.
I havn't seem any explains here showing wildly different results, but
GEQO is not nearly as non-deterministic as you suggest. The problem is
that if you are joining 100 tables it might take the length of the
universe to check all combinations. GEQO is an algorithm to find a
pretty good plan, and by and large it works well.
If you don't like it, turn it off (it's called geqo_threshold of
something like that). Or post some actual examples of it going wrong.
Seems to me like your stats are out to lunch, which means postgres
can't find the best planeven if it wanted to.
Have a nice day,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> Please line up in a tree and maintain the heap invariant while
> boarding. Thank you for flying nlogn airlines.
From | Date | Subject | |
---|---|---|---|
Next Message | Rafal Pietrak | 2008-11-05 07:41:27 | INSERT .... RETURNING |
Previous Message | Christian Schröder | 2008-11-05 07:13:10 | Re: Storage location of temporary files |