ODP: Planner performance in partitions

From: Piotr Włodarczyk <piotrwlodarczyk89(at)gmail(dot)com>
To: Michael Lewis <mlewis(at)entrata(dot)com>, David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>
Cc: MichaelDBA <MichaelDBA(at)sqlexec(dot)com>, Piotr Włodarczyk <piotr(dot)wlodarczyk(at)gnb(dot)pl>, "pgsql-performance(at)lists(dot)postgresql(dot)org" <pgsql-performance(at)lists(dot)postgresql(dot)org>
Subject: ODP: Planner performance in partitions
Date: 2019-08-13 06:29:06
Message-ID: 5d5258b0.1c69fb81.3d155.d4f8@mx.google.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)lists(dot)postgresql(dot)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?

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Sverre Boschman 2019-08-13 07:02:32 Re: Strange runtime partition pruning behaviour with 11.4
Previous Message Michael Lewis 2019-08-12 23:09:53 Re: Last event per user