GEQO randomness? - Mailing list pgsql-general

From Eric Schwarzenbach
Subject GEQO randomness?
Date
Msg-id 490B72A3.5040201@blackbrook.org
Whole thread Raw
Responses Re: GEQO randomness?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
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 actually uses a random number generator to choose paths. Can
someone confirm that this really is the case?

If so, I 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).

Eric


pgsql-general by date:

Previous
From: Aidan Van Dyk
Date:
Subject: Re: Decreasing WAL size effects
Next
From: "Scott Marlowe"
Date:
Subject: Re: Wildly erratic query performance