Re: Check lateral references within PHVs for memoize cache keys
Richard Guo <guofenglinux@gmail.com>
From: Richard Guo <guofenglinux@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>,
David Rowley <dgrowleyml@gmail.com>
Date: 2024-02-02T09:18:59Z
Lists: pgsql-hackers
Attachments
- v5-0001-Check-lateral-refs-within-PHVs-for-memoize-cache-keys.patch (application/octet-stream) patch v5-0001
On Mon, Dec 25, 2023 at 3:01 PM Richard Guo <guofenglinux@gmail.com> wrote: > On Thu, Jul 13, 2023 at 3:12 PM Richard Guo <guofenglinux@gmail.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
Commits
-
Check lateral references within PHVs for memoize cache keys
- 069d0ff0226b 18.0 landed
-
Doc: update old reference to "result cache"
- 571377dfb83d 14.9 landed
- 3883ef3236e5 15.4 landed
- 6d8b5f49f0e1 16.0 landed
- c23e7ea4d6a4 17.0 landed