Re: Is there a way to identify a plan generated by GECO?

From: Nikolay Samokhvalov <nik(at)postgres(dot)ai>
To: Jerry Brenner <jbrenner(at)guidewire(dot)com>
Cc: pgsql-performance(at)lists(dot)postgresql(dot)org
Subject: Re: Is there a way to identify a plan generated by GECO?
Date: 2025-07-18 01:43:56
Message-ID: CAM527d_cpe_mMrbO4OVLPfZGsF7ukLYA=dPAyeiy-D-smuukAQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Thu, Jul 17, 2025 at 18:11 Jerry Brenner <jbrenner(at)guidewire(dot)com> wrote:

> 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.
>

I'm not aware of ability to see if grow was involved, but with Aurora,
should be able can provision a thin (CoW) clone with PITR to a specific
point when you suspect the plan in question was used ("slow") -- and study
the planner behavior in detail, experimenting and adjusting planner
parameters.

Nik

>

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2025-07-18 01:57:45 Re: Is there a way to identify a plan generated by GECO?
Previous Message Jerry Brenner 2025-07-18 01:09:50 Is there a way to identify a plan generated by GECO?