Re: why partition pruning doesn't work?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: why partition pruning doesn't work?
Дата
Msg-id 556.1528727192@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: why partition pruning doesn't work?  (David Rowley <david.rowley@2ndquadrant.com>)
Ответы Re: why partition pruning doesn't work?  (David Rowley <david.rowley@2ndquadrant.com>)
Список pgsql-hackers
David Rowley <david.rowley@2ndquadrant.com> writes:
> On 11 June 2018 at 10:49, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> * The business with ExecFindInitialMatchingSubPlans remapping the
>> subplan indexes seems very dubious to me.  Surely, that is adding
>> way more complexity and fragility than it's worth.

> I think having the ability to prune during executor initialisation is
> enormously important. I think without it, this patch is less than half
> as useful.

Sure.

> However, if you didn't mean removing the executor
> initialise pruning, and just not remapping the arrays, then I'm not
> sure how we'd do that.  I'd previously tried having NULL subnodes in
> the Append and I thought it required too much hacking work in
> explain.c, so I decided to just collapse the array instead and do what
> was required to make it work after having removed the unneeded
> subplans. Did you have another idea on how to do this?

No, that was pretty much exactly what I was envisioning.  I have
not looked at the consequences for explain.c but it seemed like
it couldn't be all that bad; and to my mind the remapping business
in the partition code is pretty bad.  "It's all in one file" is not
a suitable justification for unintelligible, overcomplex code.

            regards, tom lane


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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Spilling hashed SetOps and aggregates to disk
Следующее
От: "Jonathan S. Katz"
Дата:
Сообщение: PostgreSQL 11 Beta 2 Release: 2018-06-28