Consider materializing the cheapest inner path in parallel nestloop
authorRichard Guo <[email protected]>
Fri, 12 Jul 2024 02:16:43 +0000 (11:16 +0900)
committerRichard Guo <[email protected]>
Fri, 12 Jul 2024 02:16:43 +0000 (11:16 +0900)
commit22d946b0f86f9c13f869bb8b75444a77a20134d8
treeb18cc42bcc9e4132e21d8074f9f89a44c9aba3a5
parent72c0b24b2ddd2d2a2b85d19222845c8c7ae3cbdb
Consider materializing the cheapest inner path in parallel nestloop

When generating non-parallel nestloop paths for each available outer
path, we always consider materializing the cheapest inner path if
feasible.  Similarly, in this patch, we also consider materializing
the cheapest inner path when building partial nestloop paths.  This
approach potentially reduces the need to rescan the inner side of a
partial nestloop path for each outer tuple.

Author: Tender Wang
Reviewed-by: Richard Guo, Robert Haas, David Rowley, Alena Rybakina
Reviewed-by: Tomasz Rybak, Paul Jungwirth, Yuki Fujii
Discussion: https://postgr.es/m/CAHewXNkPmtEXNfVQMou_7NqQmFABca9f4etjBtdbbm0ZKDmWvw@mail.gmail.com
src/backend/optimizer/path/joinpath.c
src/test/regress/expected/select_parallel.out
src/test/regress/sql/select_parallel.sql