Re: Which side of a Merge Join gets executed first? Do both sides always get executed?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





Le 20/12/2023 à 20:04, Jerry Brenner a écrit :
Thanks.  Does this make sense?

  * There are 3 nodes under the Merge Join
  * The first node is an InitPlan, due to the ANY(ARRAY()) - that gets
    executed and finds 0 matching rows
  * The second node is the outer node in the Merge Join and that is the
    expensive node in our query plan
  * The third node is the inner node in the Merge Join and that node
    references the SubPlan generated by the first node. The IndexCond
    has*"id = ANY($2) AND ..."* and the comparison with the result of
    the SubPlan does not find a match, so that's where the
    short-circuiting happens.

I think it does.

I'm not very experienced with the customs of these mailing lists, but I think the following would help to get more answers :

* TEXT format of EXPLAIN is much more readable (compared to JSON)
* A well formatted query would help
* Screenshots aren't so great

Rather than a screenshot, maybe you could use one of explain.depesz.com, explain.dalibo.com, or explain-postgresql.com ?

Best regards,
Frédéric





[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux