Re: Hybrid Hash/Nested Loop joins and caching results from subplans
Andy Fan <zhihui.fan1213@gmail.com>
From: Andy Fan <zhihui.fan1213@gmail.com>
To: Simon Riggs <simon@2ndquadrant.com>
Cc: David Rowley <dgrowleyml@gmail.com>, PostgreSQL Developers <pgsql-hackers@lists.postgresql.org>
Date: 2020-05-22T00:11:51Z
Lists: pgsql-hackers
> My question is whether it should be added as an optional facility of a > parameterised sub plan, rather than an always-needed full-strength node. > That way the choice of whether to use it can happen at execution time once > we notice that we've been called too many times. > > Actually I am not sure about what does the "parameterized sub plan" mean (I treat is a SubPlan Node), so please correct me if I misunderstand you:) Because the inner plan in nest loop not a SubPlan node actually. so if bind the facility to SubPlan node, we may loss the chances for nest loop. And when we consider the usage for nest loop, we can consider the below example, where this feature will be more powerful. select j1o.i, j2_v.sum_5 from j1 j1o inner join lateral (select im100, sum(im5) as sum_5 from j2 where j1o.im100 = im100 and j1o.i = 1 group by im100) j2_v on true where j1o.i = 1; -- Best Regards Andy Fan
Commits
-
Add Result Cache executor node (take 2)
- 9eacee2e62d8 14.0 landed
-
Add Result Cache executor node
- b6002a796dc0 14.0 landed
-
Allow estimate_num_groups() to pass back further details about the estimation
- ed934d4fa30f 14.0 landed
-
Allow users of simplehash.h to perform direct deletions
- ff53d7b159b9 14.0 landed
-
Cache if PathTarget and RestrictInfos contain volatile functions
- f58b230ed0db 14.0 landed
-
Fix pull_varnos' miscomputation of relids set for a PlaceHolderVar.
- 55dc86eca70b 14.0 cited