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

Поиск
Список
Период
Сортировка
От David Rowley
Тема Re: [PoC] Reducing planning time when tables have many partitions
Дата
Msg-id CAApHDvpxGeYU50KmsNoqctB_5oTsf+OTtPJVHv0G6w8bpZXqHw@mail.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  (Thom Brown <thom@linux.com>)
Список pgsql-hackers
On Tue, 6 Dec 2022 at 04:45, Thom Brown <thom@linux.com> wrote:
> Testing your patches with the same 1024 partitions, each with 64
> sub-partitions, I get a planning time of 205.020 ms, which is now a
> 1,377x speedup.  This has essentially reduced the planning time from a
> catastrophe to a complete non-issue.  Huge win!

Thanks for testing the v10 patches.

I wouldn't have expected such additional gains from v10. I was mostly
focused on trying to minimise any performance regression for simple
queries that wouldn't benefit from indexing the EquivalenceMembers.
Your query sounds like it does not fit into that category.  Perhaps it
is down to the fact that v9-0002 or v9-0003 reverts a couple of the
optimisations that is causing v9 to be slower than v10 for your query.
It's hard to tell without more details of what you're running.

Is this a schema and query you're able to share? Or perhaps mock up a
script of something similar enough to allow us to see why v9 and v10
are so different?

Additionally, it would be interesting to see if patching with v10-0002
alone helps the performance of your query at all. I didn't imagine
that change would give us anything easily measurable, but partition
pruning makes extensive use of Bitmapsets, so perhaps you've found
something. If you have then it might be worth considering v10-0002
independently of the EquivalenceMember indexing work.

David



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

Предыдущее
От: Pavel Luzanov
Дата:
Сообщение: Re: predefined role(s) for VACUUM and ANALYZE
Следующее
От: Thomas Munro
Дата:
Сообщение: Re: Collation version tracking for macOS