From: | Andres Freund <andres(at)anarazel(dot)de> |
---|---|
To: | Richard Guo <guofenglinux(at)gmail(dot)com> |
Cc: | David Rowley <dgrowleyml(at)gmail(dot)com>, Andrei Lepikhov <lepihov(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Memoize ANTI and SEMI JOIN inner |
Date: | 2025-05-13 13:51:42 |
Message-ID: | stm4qkkcm2cr45kgkbgudaya5a3vvm3elgkvuopp5rmmw2uodl@lnhexcxa6olh |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
On 2025-04-10 19:36:14 +0900, Richard Guo wrote:
> On Wed, Apr 9, 2025 at 6:18 PM David Rowley <dgrowleyml(at)gmail(dot)com> wrote:
> > On Wed, 9 Apr 2025 at 18:48, Richard Guo <guofenglinux(at)gmail(dot)com> wrote:
> > > Perhaps we could spend some planner cycles proving inner_unique for
> > > anti joins, so that Memoize nodes can be considered for them?
>
> > Worth a try. It should be pretty easy to enable, as far as I can see.
> > It might just be a case of shuffling the cases around in the switch
> > statement in add_paths_to_joinrel().
>
> Right. Here is a patch for that.
This is failing on CI:
https://cirrus-ci.com/github/postgresql-cfbot/postgresql/cf%2F5636
https://api.cirrus-ci.com/v1/artifact/task/5411026402803712/testrun/build-32/testrun/regress/regress/regression.diffs
diff -U3 /tmp/cirrus-ci-build/src/test/regress/expected/memoize.out /tmp/cirrus-ci-build/build-32/testrun/regress/regress/results/memoize.out
--- /tmp/cirrus-ci-build/src/test/regress/expected/memoize.out 2025-04-12 11:24:10.866868945 +0000
+++ /tmp/cirrus-ci-build/build-32/testrun/regress/regress/results/memoize.out 2025-04-12 11:32:44.454864476 +0000
@@ -525,7 +525,7 @@
-> Unique (actual rows=2.67 loops=N)
-> Sort (actual rows=67.33 loops=N)
Sort Key: t2_1.a
- Sort Method: quicksort Memory: 27kB
+ Sort Method: quicksort Memory: 18kB
-> Seq Scan on tab_anti t2_1 (actual rows=100.00 loops=N)
(15 rows)
There shouldn't be Memory mentioned in tests added to the tree.
Greetings,
Andres
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2025-05-13 13:57:46 | Re: Add partial :-variable expansion to psql \copy |
Previous Message | Andres Freund | 2025-05-13 13:46:32 | Re: Serverside SNI support in libpq |