ODP: Planner performance in partitions

Поиск
Список
Период
Сортировка
От Piotr Włodarczyk
Тема ODP: Planner performance in partitions
Дата
Msg-id 5d5258b0.1c69fb81.3d155.d4f8@mx.google.com
обсуждение исходный текст
Ответ на Re: Planner performance in partitions  (Michael Lewis <mlewis@entrata.com>)
Список pgsql-performance

As you wrote we have about 400/500 partitions in real life. So time problem is much smaller, but still it is and in one place of aur application we have decided to help DB and we're indicating in query exact partition we need. What pushed me to do this test? Just curiosity I think. After I saw in pg_locks that all partitions which was selected in uncommitted transaction have ACCESS SHARED i've started thinking about efficiency. And that way here we are. Why we need some hundred partitions? It’s because our main table (public.book) have hundreds of millions records. It’s not maintainable. VACUUM never ends, space on device is huge and we cannot take database down for longer that 2-3 hours, what is too short to maintain them manually. So we've partitioned them on two levels. First on id_owner (which is in every query) and the second level based on date. It’ll help as detach partitions with old data we no longer need.

 

Pozdrawiam,

Piotr Włodarczyk

 

Od: Michael Lewis
Wysłano: wtorek, 13 sierpnia 2019 00:37
Do: David Rowley
DW: Piotr Włodarczyk; MichaelDBA; Piotr Włodarczyk; pgsql-performance@lists.postgresql.org
Temat: Re: Planner performance in partitions

 

Was there a reason to exceed 100-500 partitions in real life that pushed you to do this test? Is there some issue you see when using 100 partitions that is solved or reduced in severity by increasing to 1200 or 6000 partitions?

 

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

Предыдущее
От: Michael Lewis
Дата:
Сообщение: Re: Last event per user
Следующее
От: Sverre Boschman
Дата:
Сообщение: Re: Strange runtime partition pruning behaviour with 11.4