ODP: Planner performance in partitions - Mailing list pgsql-performance

From Piotr Włodarczyk
Subject ODP: Planner performance in partitions
Date
Msg-id 5d5258b0.1c69fb81.3d155.d4f8@mx.google.com
Whole thread Raw
In response to Re: Planner performance in partitions  (Michael Lewis <mlewis@entrata.com>)
List 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 by date:

Previous
From: Michael Lewis
Date:
Subject: Re: Last event per user
Next
From: Sverre Boschman
Date:
Subject: Re: Strange runtime partition pruning behaviour with 11.4