On Thu, Jan 10, 2019 at 6:49 PM Ashutosh Bapat <ashutosh.bapat....@gmail.com> wrote: > Though this will solve a problem for performance when partition-wise join is > not possible, we still have the same problem when partition-wise join is > possible. And that problem really happens because our inheritance mechanism > requires expression translation from parent to child everywhere. That > consumes memory, eats CPU cycles and generally downgrades performance of > partition related query planning. I think a better way would be to avoid > these translations and use Parent var to represent a Var of the child being > dealt with. That will be a massive churn on inheritance based planner code, > but it will improve planning time for queries involving thousands of > partitions.
Yeah, it would be nice going forward to overhaul inheritance planning such that parent-to-child Var translation is not needed, especially where no pruning can occur or many partitions remain even after pruning. Thanks, Amit