Re: Query with high planning time at version 11.1 compared versions 10.5 and 11.0
Alvaro Herrera <alvherre@2ndquadrant.com>
From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Cc: Justin Pryzby <pryzby@telsasoft.com>, Sanyo Moura <sanyo.moura@tatic.net>, jeff.janes@gmail.com, David Rowley <david.rowley@2ndquadrant.com>, Robert Haas <robertmhaas@gmail.com>, Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>, pgsql-performance@lists.postgresql.org, Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2018-12-06T07:57:26Z
Lists: pgsql-hackers, pgsql-performance
On 2018-Dec-06, Amit Langote wrote: > The partitionwise join related > changes in PG 11 moved the add_child_rel_equivalences call in > set_append_rel_size such that child EC members would be added even before > checking if the child rel is dummy, but for a reason named in the comment > above the call: > > ... Even if this child is > * deemed dummy, it may fall on nullable side in a child-join, which > * in turn may participate in a MergeAppend, where we will need the > * EquivalenceClass data structures. > > However, I think we can skip adding the dummy child EC members here and > instead make it a responsibility of partitionwise join code in joinrels.c > to add the needed EC members. Attached a patch to show what I mean, which > passes the tests and gives this planning time: Robert, Ashutosh, any comments on this? I'm unfamiliar with the partitionwise join code. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Commits
-
Postpone generating tlists and EC members for inheritance dummy children.
- b10e3bba8673 11.2 landed
- 8d8dcead1295 12.0 landed
-
Allow direct lookups of AppendRelInfo by child relid
- 7d872c91a3f9 11.0 cited