Re: Pathify RHS unique-ification for semijoin planning
Richard Guo <guofenglinux@gmail.com>
From: Richard Guo <guofenglinux@gmail.com>
To: Álvaro Herrera <alvherre@kurilemu.de>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>,
Tom Lane <tgl@sss.pgh.pa.us>, Andy Fan <zhihuifan1213@163.com>, wenhui qiu <qiuwenhuifx@gmail.com>
Date: 2025-07-24T03:40:50Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Simplify relation_has_unique_index_for()
- bf9ee294e567 19 (unreleased) landed
-
Pathify RHS unique-ification for semijoin planning
- 24225ad9aafc 19 (unreleased) landed
-
Convert varatt.h access macros to static inline functions.
- e035863c9a04 19 (unreleased) cited
-
Re-export a few of createplan.c's make_xxx() functions.
- 570be1f73f38 9.6.0 cited
On Wed, Jul 23, 2025 at 5:11 PM Álvaro Herrera <alvherre@kurilemu.de> wrote: > As a very trivial test on this patch, I ran the query in your opening > email, both with and without the patch, scaling up the size of the table > a little bit. > This is a really nice improvement. I think we could find queries that > are arbitrarily faster, by feeding enough tuples to the unnecessary Sort > nodes. Thank you for testing this patch! In addition to eliminating unnecessary sort nodes, this patch also allows us to exploit pre-sorted paths that aren't necessarily the cheapest total during the unique-ification step. It also allows the use of parallel plans for that step on large tables. I think we could also find queries that become faster as a result of these improvements. Thanks Richard