Re: Unnecessary lateral dependencies implied by PHVs

Поиск
Список
Период
Сортировка
От Andy Fan
Тема Re: Unnecessary lateral dependencies implied by PHVs
Дата
Msg-id CAKU4AWoEqy3kGWWYgNbNDe=9DyuA54Jb=6bSLWk3PuF8rwsWqg@mail.gmail.com
обсуждение исходный текст
Ответ на Unnecessary lateral dependencies implied by PHVs  (Richard Guo <guofenglinux@gmail.com>)
Ответы Re: Unnecessary lateral dependencies implied by PHVs  (Richard Guo <guofenglinux@gmail.com>)
Список pgsql-hackers
Hi Richard:

On Mon, Oct 10, 2022 at 10:35 AM Richard Guo <guofenglinux@gmail.com> wrote:
... I'm asking because
PHVs may imply lateral dependencies which may make us have to use
nestloop join.

I thought lateral join imply nestloop join,  am I missing something?  Here is my simple
testing. 

postgres=# explain (costs off) select * from r1 join lateral (select r1.a from r2) on true;
         QUERY PLAN
----------------------------
 Nested Loop
   ->  Seq Scan on r1
   ->  Materialize
         ->  Seq Scan on r2
(4 rows)

Time: 0.349 ms
postgres=# set enable_nestloop to off;
SET
Time: 0.123 ms

postgres=# explain (costs off) select * from r1 join lateral (select r1.a from r2) on true;
         QUERY PLAN
----------------------------
 Nested Loop
   ->  Seq Scan on r1
   ->  Materialize
         ->  Seq Scan on r2
(4 rows)

--
Best Regards
Andy Fan

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Zheng Li
Дата:
Сообщение: Re: Support logical replication of DDLs
Следующее
От: "kuroda.hayato@fujitsu.com"
Дата:
Сообщение: RE: TRAP: FailedAssertion("prev_first_lsn < cur_txn->first_lsn", File: "reorderbuffer.c", Line: 927, PID: 568639)