From: Benjamin Coutu <ben.coutu@zeyos.com>
To: David Rowley <dgrowleyml@gmail.com>
Cc: pgsql-performance <pgsql-performance@postgresql.org>
Subject: Re: Useless memoize path generated for unique join on primary keys
Date: Tue, 03 May 2022 14:21:46 +0200
Message-ID: <052166fdb31e17b9ef89@zeyos.com> (raw)
In-Reply-To: <CAApHDvpPvJ7HwKRPTXhrGbV1bERVQmnf819a6sPLirOBK=4Q-g@mail.gmail.com>
References: <CAApHDvpPvJ7HwKRPTXhrGbV1bERVQmnf819a6sPLirOBK=4Q-g@mail.gmail.com>
> I'd say it's a pretty different problem. The cache hit ratio
> discussion on that thread talks about underestimating the hit ratio.
> That particular problem could only lead to Memoize plans *not* being
> chosen when they maybe should be. Not the other way around, which is
> your case.
>
> create statistics extdataregular_field_index_stats (ndistinct) on
> field, index from extdataregular;
> analyze extdataregular;
>
> would likely put that right.
Thanks David, using extended statistics for both (and only for both) tables solved this problem.
BTW, thank you for all your work on performance in recent releases.
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: pgsql-performance@postgresql.org
Cc: ben.coutu@zeyos.com, dgrowleyml@gmail.com
Subject: Re: Useless memoize path generated for unique join on primary keys
In-Reply-To: <052166fdb31e17b9ef89@zeyos.com>
* 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