Re: [PoC] Reducing planning time when tables have many partitions

Поиск
Список
Период
Сортировка
Искать
От
Lepikhov Andrei
Тема
Re: [PoC] Reducing planning time when tables have many partitions
Дата
Msg-id
09699133-2c45-4606-acb5-a235e7724466@app.fastmail.com
Ответ на
Список
Дерево обсуждения
[PoC] Reducing planning time when tables have many partitions Yuya Watari <watari.yuya@gmail.com>
Re: [PoC] Reducing planning time when tables have many partitions David Rowley <dgrowleyml@gmail.com>
Re: [PoC] Reducing planning time when tables have many partitions Yuya Watari <watari.yuya@gmail.com>
Re: [PoC] Reducing planning time when tables have many partitions Tom Lane <tgl@sss.pgh.pa.us>
Re: [PoC] Reducing planning time when tables have many partitions David Rowley <dgrowleyml@gmail.com>
Re: [PoC] Reducing planning time when tables have many partitions Yuya Watari <watari.yuya@gmail.com>
Re: [PoC] Reducing planning time when tables have many partitions David Rowley <dgrowleyml@gmail.com>
Re: [PoC] Reducing planning time when tables have many partitions Yuya Watari <watari.yuya@gmail.com>
Re: [PoC] Reducing planning time when tables have many partitions David Rowley <dgrowleyml@gmail.com>
Re: [PoC] Reducing planning time when tables have many partitions David Rowley <dgrowleyml@gmail.com>
Re: [PoC] Reducing planning time when tables have many partitions Yuya Watari <watari.yuya@gmail.com>
Re: [PoC] Reducing planning time when tables have many partitions David Rowley <dgrowleyml@gmail.com>
Re: [PoC] Reducing planning time when tables have many partitions Yuya Watari <watari.yuya@gmail.com>
Re: [PoC] Reducing planning time when tables have many partitions Yuya Watari <watari.yuya@gmail.com>
Re: [PoC] Reducing planning time when tables have many partitions Yuya Watari <watari.yuya@gmail.com>
Re: [PoC] Reducing planning time when tables have many partitions Yuya Watari <watari.yuya@gmail.com>
Re: [PoC] Reducing planning time when tables have many partitions Andrey Lepikhov <a.lepikhov@postgrespro.ru>
Re: [PoC] Reducing planning time when tables have many partitions Andrey Lepikhov <a.lepikhov@postgrespro.ru>
Re: [PoC] Reducing planning time when tables have many partitions Tom Lane <tgl@sss.pgh.pa.us>
Re: [PoC] Reducing planning time when tables have many partitions Zhang Mingli <zmlpostgres@gmail.com>
Re: [PoC] Reducing planning time when tables have many partitions Thom Brown <thom@linux.com>
Re: [PoC] Reducing planning time when tables have many partitions Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: [PoC] Reducing planning time when tables have many partitions Thom Brown <thom@linux.com>
Re: [PoC] Reducing planning time when tables have many partitions Thom Brown <thom@linux.com>
Re: [PoC] Reducing planning time when tables have many partitions Yuya Watari <watari.yuya@gmail.com>
Re: [PoC] Reducing planning time when tables have many partitions David Rowley <dgrowleyml@gmail.com>
Re: [PoC] Reducing planning time when tables have many partitions Thom Brown <thom@linux.com>
Re: [PoC] Reducing planning time when tables have many partitions David Rowley <dgrowleyml@gmail.com>
Re: [PoC] Reducing planning time when tables have many partitions Thom Brown <thom@linux.com>
Re: [PoC] Reducing planning time when tables have many partitions Yuya Watari <watari.yuya@gmail.com>
Re: [PoC] Reducing planning time when tables have many partitions David Rowley <dgrowleyml@gmail.com>
Re: [PoC] Reducing planning time when tables have many partitions Yuya Watari <watari.yuya@gmail.com>
Re: [PoC] Reducing planning time when tables have many partitions Yuya Watari <watari.yuya@gmail.com>
Re: [PoC] Reducing planning time when tables have many partitions David Rowley <dgrowleyml@gmail.com>
Re: [PoC] Reducing planning time when tables have many partitions Yuya Watari <watari.yuya@gmail.com>
Re: [PoC] Reducing planning time when tables have many partitions Andrey Lepikhov <a.lepikhov@postgrespro.ru>
Re: [PoC] Reducing planning time when tables have many partitions Yuya Watari <watari.yuya@gmail.com>
Re: [PoC] Reducing planning time when tables have many partitions Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: [PoC] Reducing planning time when tables have many partitions David Rowley <dgrowleyml@gmail.com>
Re: [PoC] Reducing planning time when tables have many partitions Yuya Watari <watari.yuya@gmail.com>
Re: [PoC] Reducing planning time when tables have many partitions Yuya Watari <watari.yuya@gmail.com>
Re: [PoC] Reducing planning time when tables have many partitions Andrey Lepikhov <a.lepikhov@postgrespro.ru>
Re: [PoC] Reducing planning time when tables have many partitions Andrey Lepikhov <a.lepikhov@postgrespro.ru>
Re: [PoC] Reducing planning time when tables have many partitions Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>
Re: [PoC] Reducing planning time when tables have many partitions Yuya Watari <watari.yuya@gmail.com>
Re: [PoC] Reducing planning time when tables have many partitions Andrey Lepikhov <a.lepikhov@postgrespro.ru>
Re: [PoC] Reducing planning time when tables have many partitions Yuya Watari <watari.yuya@gmail.com>
Re: [PoC] Reducing planning time when tables have many partitions Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>
Re: [PoC] Reducing planning time when tables have many partitions Yuya Watari <watari.yuya@gmail.com>
Re: [PoC] Reducing planning time when tables have many partitions Andrey Lepikhov <a.lepikhov@postgrespro.ru>
Re: [PoC] Reducing planning time when tables have many partitions Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>
Re: [PoC] Reducing planning time when tables have many partitions Andrey Lepikhov <a.lepikhov@postgrespro.ru>
Re: [PoC] Reducing planning time when tables have many partitions Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>
Re: [PoC] Reducing planning time when tables have many partitions Yuya Watari <watari.yuya@gmail.com>
Re: [PoC] Reducing planning time when tables have many partitions David Rowley <dgrowleyml@gmail.com>
Re: [PoC] Reducing planning time when tables have many partitions Yuya Watari <watari.yuya@gmail.com>
Re: [PoC] Reducing planning time when tables have many partitions Yuya Watari <watari.yuya@gmail.com>
Re: [PoC] Reducing planning time when tables have many partitions Andrey Lepikhov <a.lepikhov@postgrespro.ru>
Re: [PoC] Reducing planning time when tables have many partitions Yuya Watari <watari.yuya@gmail.com>
Re: [PoC] Reducing planning time when tables have many partitions "Lepikhov Andrei" <a.lepikhov@postgrespro.ru>
Re: [PoC] Reducing planning time when tables have many partitions Yuya Watari <watari.yuya@gmail.com>
Re: [PoC] Reducing planning time when tables have many partitions Alena Rybakina <lena.ribackina@yandex.ru>
Re: [PoC] Reducing planning time when tables have many partitions John Naylor <johncnaylorls@gmail.com>
Re: [PoC] Reducing planning time when tables have many partitions Tom Lane <tgl@sss.pgh.pa.us>
Re: [PoC] Reducing planning time when tables have many partitions Alena Rybakina <lena.ribackina@yandex.ru>
Re: [PoC] Reducing planning time when tables have many partitions Andrei Lepikhov <a.lepikhov@postgrespro.ru>
Re: [PoC] Reducing planning time when tables have many partitions Yuya Watari <watari.yuya@gmail.com>
Re: [PoC] Reducing planning time when tables have many partitions Yuya Watari <watari.yuya@gmail.com>
Re: [PoC] Reducing planning time when tables have many partitions Yuya Watari <watari.yuya@gmail.com>
Re: [PoC] Reducing planning time when tables have many partitions Alena Rybakina <lena.ribackina@yandex.ru>
Re: [PoC] Reducing planning time when tables have many partitions Yuya Watari <watari.yuya@gmail.com>
Re: [PoC] Reducing planning time when tables have many partitions Alena Rybakina <lena.ribackina@yandex.ru>
Re: [PoC] Reducing planning time when tables have many partitions Yuya Watari <watari.yuya@gmail.com>
Re: [PoC] Reducing planning time when tables have many partitions Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>
Re: [PoC] Reducing planning time when tables have many partitions Yuya Watari <watari.yuya@gmail.com>
Re: [PoC] Reducing planning time when tables have many partitions jian he <jian.universality@gmail.com>
Re: [PoC] Reducing planning time when tables have many partitions Yuya Watari <watari.yuya@gmail.com>
Re: [PoC] Reducing planning time when tables have many partitions Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>
Re: [PoC] Reducing planning time when tables have many partitions Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>
Re: [PoC] Reducing planning time when tables have many partitions Yuya Watari <watari.yuya@gmail.com>
Re: [PoC] Reducing planning time when tables have many partitions David Rowley <dgrowleyml@gmail.com>
Re: [PoC] Reducing planning time when tables have many partitions David Rowley <dgrowleyml@gmail.com>
Re: [PoC] Reducing planning time when tables have many partitions Yuya Watari <watari.yuya@gmail.com>
Re: [PoC] Reducing planning time when tables have many partitions Andrey Lepikhov <a.lepikhov@postgrespro.ru>
Re: [PoC] Reducing planning time when tables have many partitions Yuya Watari <watari.yuya@gmail.com>
On Wed, Sep 20, 2023, at 5:04 PM, Yuya Watari wrote:
> On Tue, Sep 19, 2023 at 5:21 PM Andrey Lepikhov
>  wrote:
>> Working on self-join removal in the thread [1] nearby, I stuck into the
>> problem, which made an additional argument to work in this new direction
>> than a couple of previous ones.
>> With indexing positions in the list of equivalence members, we make some
>> optimizations like join elimination more complicated - it may need to
>> remove some clauses and equivalence class members.
>> For changing lists of derives or ec_members, we should go through all
>> the index lists and fix them, which is a non-trivial operation.
>
> Thank you for looking into this and pointing that out. I understand
> that this problem will occur somewhere like your patch [1] quoted
> below because we need to modify RelOptInfo->eclass_child_members in
> addition to ec_members. Is my understanding correct? (Of course, I
> know ec_[no]rel_members, but I doubt we need them.)

It is okay if we talk about the self-join-removal feature specifically because joins are removed before an inheritance expansion.
But ec_source_indexes and ec_derive_indexes point to specific places in eq_sources and eq_derives lists. If I removed an EquivalenceClass or a restriction during an optimisation, I would arrange all indexes, too.
Right now, I use a workaround here and remove the index link without removing the element from the list. But I'm not sure how good this approach can be in perspective.
So, having eq_sources and eq_derives localised in EC could make such optimisations a bit more simple.

-- 
Regards,
Andrei Lepikhov


В списке pgsql-hackers по дате отправления
От: Tom Lane
Дата:
От: Dilip Kumar
Дата:
FAQ