Re: Accounting for between table correlation - Mailing list pgsql-general

From Tom Lane
Subject Re: Accounting for between table correlation
Date
Msg-id 551426.1611094547@sss.pgh.pa.us
Whole thread Raw
In response to Re: Accounting for between table correlation  (Alexander Stoddard <alexander.stoddard@gmail.com>)
List pgsql-general
Alexander Stoddard <alexander.stoddard@gmail.com> writes:
> Thank you for this. I can get different plans by changing the different
> parameters, but if the output of EXPLAIN VERBOSE tells me geqo planning
> specifically is being used I'm not seeing it.  Is there a way to see in the
> explain plan if geqo was used?

It's not reported directly, but you can assume that it was used if the
number of relations in the query (the number of table scans in the plan,
more or less) is >= geqo_threshold.  Or if you're unsure, check whether
turning the "geqo" boolean on/off changes the plan at all.  In theory you
might get exactly the same plan from the regular and geqo planners, but
for reasonable values of geqo_threshold that's pretty unlikely, I think.

(Another way to be sure might be to notice whether turning geqo on/off
changes the planning time significantly.  geqo off should be a great deal
more expensive for large plans.)

            regards, tom lane



pgsql-general by date:

Previous
From: Alexander Stoddard
Date:
Subject: Re: Accounting for between table correlation
Next
From: Michael Paquier
Date:
Subject: Re: Error messages on duplicate schema names