Re: GEQO randomness?

From: Bruce Momjian <bruce(at)momjian(dot)us>
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: GEQO randomness?
Date: 2008-11-04 22:45:46
Message-ID: 200811042245.mA4MjkW23917@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Eric Schwarzenbach wrote:
> This is in a sense a followup to my post with subject "Wildly erratic
> query performance". The more I think about it the only thing that makes
> sense of my results is if the query planner really WAS choosing my join
> order truly randomly each time. I went digging into the manual and
> Section 49.3.1. "Generating Possible Plans with GEQO" says
>
> "In the initial stage, the GEQO code simply generates some possible join
> sequences at random."
>
> Now ordinarily I would interpret this use of the word random loosely, to
> mean "arbitrarily" or using some non-meaningful selection criteria. But
> given what I am seeing, this leads me to consider that "random" is meant
> literally, and that it uses a random number generate to pick paths. Can
> someone confirm that this is the case?

Yes, "random" means random.

> Is this really a good idea? Is non-deterministic behavior really
> acceptable? I would think it would be much more sensible to have it
> operate deterministically (such as with some predetermined random
> sequence of numbers used repeatedly).

Uh, no one has ever asked for that.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2008-11-04 22:52:02 Re: pg_casts view (was Re: date_trun() with timezones? (was Re: TIME column ...))
Previous Message Tom Allison 2008-11-04 22:37:20 postgresql installation - PL/???