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

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: Benjamin Coutu <ben(dot)coutu(at)zeyos(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:31:32
Message-ID: CAApHDvrjwrmnxe__Xhz0NyxKL6d1wW7i=2_p+d5oj2QfmTCnhA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Wed, 4 May 2022 at 00:21, Benjamin Coutu <ben(dot)coutu(at)zeyos(dot)com> wrote:
> Thanks David, using extended statistics for both (and only for both) tables solved this problem.

Oh, whoops. I did get that backwards. The estimate used by the
Memoize costing code is from the outer side of the join, which is the
extdataempty in this case. I don't think the
extdataregular_field_index_stats will do anything. It'll be the ones
you added on extdataempty that are making it work.

> BTW, thank you for all your work on performance in recent releases.

Thanks for the feedback :)

David

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Levi Aul 2022-05-03 18:11:31 Window partial fetch optimization
Previous Message Benjamin Coutu 2022-05-03 12:21:46 Re: Useless memoize path generated for unique join on primary keys