Re: Check lateral references within PHVs for memoize cache keys

From: Richard Guo <guofenglinux(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, David Rowley <dgrowleyml(at)gmail(dot)com>
Subject: Re: Check lateral references within PHVs for memoize cache keys
Date: 2024-02-02 09:18:59
Message-ID: CAMbWs49Z6TrH4qJuudPx2toeJutPOV1CyvbL3GE1QNg_LaATEg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Dec 25, 2023 at 3:01 PM Richard Guo <guofenglinux(at)gmail(dot)com> wrote:

> On Thu, Jul 13, 2023 at 3:12 PM Richard Guo <guofenglinux(at)gmail(dot)com>
> wrote:
>
>> So I'm wondering if it'd be better that we move all this logic of
>> computing additional lateral references within PHVs to get_memoize_path,
>> where we can examine only PHVs that are evaluated at innerrel. And
>> considering that these lateral refs are only used by Memoize, it seems
>> more sensible to compute them there. But I'm a little worried that
>> doing this would make get_memoize_path too expensive.
>>
>> Please see v4 patch for this change.
>>
>
> I'd like to add that not checking PHVs for lateral references can lead
> to performance regressions with Memoize node.
>

The v4 patch does not apply any more. I've rebased it on master.
Nothing else has changed.

Thanks
Richard

Attachment Content-Type Size
v5-0001-Check-lateral-refs-within-PHVs-for-memoize-cache-keys.patch application/octet-stream 11.2 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message John Naylor 2024-02-02 09:21:01 Re: Change GUC hashtable to use simplehash?
Previous Message Artur Zakirov 2024-02-02 09:11:34 Re: Checking MINIMUM_VERSION_FOR_WAL_SUMMARIES