public inbox for [email protected]  
help / color / mirror / Atom feed
From: Jerry Brenner <[email protected]>
To: [email protected]
Subject: Is there a way to identify a plan generated by GECO?
Date: Thu, 17 Jul 2025 18:09:50 -0700
Message-ID: <CACoKFYRSOZFA0m33BCDHBkget30sY71hMwH9peHvTKxcV6Ha4A@mail.gmail.com> (raw)

We are on Postgres 15.5 (Aurora)  and capturing query plans via
auto_explain.  We are seeing a large number of query plans for 2 queries
that have 12 tables.  Every fast (or "fast enough") plan has a left deep
tree and every slow plan has a bushy tree.  Is there a way to determine if
a plan was generated by GECO?

We have from_collapse_limit, join_collapse_limit and geqo_threshold all set
to 12.  (There is a COUNT(*) above derived table - could that be somehow
affecting this?)

I've manually explained plans and haven't seen the problem, but then it
turns up the next day (with the same parameter values) with multiple
execution plans.

One more data point - each of the individual query plans is executed in a
distinct time range (during the customer's test).  (No environment changes
between these time ranges.)  The only overlap was with one of the queries
where a single execution of a generic plan occurred during the time range
that a different plan was being executed. (The generic plan was the fastest
plan out of all of the plans.)


view thread (6+ messages)  latest in thread

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 using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: Is there a way to identify a plan generated by GECO?
  In-Reply-To: <CACoKFYRSOZFA0m33BCDHBkget30sY71hMwH9peHvTKxcV6Ha4A@mail.gmail.com>

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

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