pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alexander Stoddard <alexander.stoddard@gmail.com>
Cc: Michael Lewis <mlewis@entrata.com>
Cc: pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>
Cc: David G. Johnston <david.g.johnston@gmail.com>
Cc: Thomas Kellerer <shammat@gmx.net>
Subject: Re: Accounting for between table correlation
Date: Tue, 19 Jan 2021 17:15:47 -0500
Message-ID: <551426.1611094547@sss.pgh.pa.us> (raw)
In-Reply-To: <CADDNc-CA0Y=1Urh3nLGy8nZf7V8cDrHcD1V6dpgzfLkJsPtz=w@mail.gmail.com>
References: <CADDNc-B=spVE0FjJEOUEsGo+ChvvkPjyLZk+MV-YHz80Fo4BCw@mail.gmail.com>
	<b804bb4e-8f7b-d391-8827-a82b137321e8@gmail.com>
	<CA+ONtZ4+HhQmouVGi5+E_G5LgZoYnBqhvXJQBM=HxWm+zcSenw@mail.gmail.com>
	<f21e04a3-33e7-caa4-6044-5931bf231b79@gmx.net>
	<CAKFQuwYCoqUkNTe3jjXr5ThCv-xw70uEwST97xXGnm9zS-A0aA@mail.gmail.com>
	<CADDNc-B7fHboEt8NZk4PPcXL6KmEpY9qgXywPs656_h_FThBWQ@mail.gmail.com>
	<CAHOFxGqA_cRbJWXPLOzzrmTE4NwBGy-zWpx-JE0vH4OdJi90RQ@mail.gmail.com>
	<CADDNc-C330AHOm4JudxxveA=DGW92KpFXygkjHsbPZyrF4N_MA@mail.gmail.com>
	<CAHOFxGrwYK41=e0BESL0ZNRvebZCe8ZKm+ZNkie5zz+64FgOxQ@mail.gmail.com>
	<CADDNc-CA0Y=1Urh3nLGy8nZf7V8cDrHcD1V6dpgzfLkJsPtz=w@mail.gmail.com>

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





view thread (18+ messages)

Message-ID: <551426.1611094547@sss.pgh.pa.us>
Permalink:  ../551426.1611094547@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/551426.1611094547@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: tgl@sss.pgh.pa.us, alexander.stoddard@gmail.com, mlewis@entrata.com, david.g.johnston@gmail.com, shammat@gmx.net
  Subject: Re: Accounting for between table correlation
  In-Reply-To: <551426.1611094547@sss.pgh.pa.us>
  References: <CADDNc-B=spVE0FjJEOUEsGo+ChvvkPjyLZk+MV-YHz80Fo4BCw@mail.gmail.com> <b804bb4e-8f7b-d391-8827-a82b137321e8@gmail.com> <CA+ONtZ4+HhQmouVGi5+E_G5LgZoYnBqhvXJQBM=HxWm+zcSenw@mail.gmail.com> <f21e04a3-33e7-caa4-6044-5931bf231b79@gmx.net> <CAKFQuwYCoqUkNTe3jjXr5ThCv-xw70uEwST97xXGnm9zS-A0aA@mail.gmail.com> <CADDNc-B7fHboEt8NZk4PPcXL6KmEpY9qgXywPs656_h_FThBWQ@mail.gmail.com> <CAHOFxGqA_cRbJWXPLOzzrmTE4NwBGy-zWpx-JE0vH4OdJi90RQ@mail.gmail.com> <CADDNc-C330AHOm4JudxxveA=DGW92KpFXygkjHsbPZyrF4N_MA@mail.gmail.com> <CAHOFxGrwYK41=e0BESL0ZNRvebZCe8ZKm+ZNkie5zz+64FgOxQ@mail.gmail.com> <CADDNc-CA0Y=1Urh3nLGy8nZf7V8cDrHcD1V6dpgzfLkJsPtz=w@mail.gmail.com> <551426.1611094547@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox