Re: Useless memoize path generated for unique join on primary keys

From: Benjamin Coutu <ben(dot)coutu(at)zeyos(dot)com>
To: David Rowley <dgrowleyml(at)gmail(dot)com>
Cc: pgsql-performance <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Useless memoize path generated for unique join on primary keys
Date: 2022-05-03 12:21:46
Message-ID: 052166fdb31e17b9ef89@zeyos.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

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

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message David Rowley 2022-05-03 12:31:32 Re: Useless memoize path generated for unique join on primary keys
Previous Message David Rowley 2022-05-03 11:43:09 Re: Useless memoize path generated for unique join on primary keys