pg.ddx.io pgsql-performance@postgresql.org mailing list archivehelp / color / mirror / Atom feed
From: MichaelDBA <MichaelDBA@sqlexec.com>
To: Michael Lewis <mlewis@entrata.com>
Cc: Piotr Włodarczyk <piotr.wlodarczyk@gnb.pl>
Cc: pgsql-performance@lists.postgresql.org <pgsql-performance@lists.postgresql.org>
Subject: Re: Planner performance in partitions
Date: Mon, 12 Aug 2019 15:24:58 -0400
Message-ID: <458dfc43-b097-29f3-4e0e-857b9c30b427@sqlexec.com> (raw)
In-Reply-To: <CAHOFxGrPiuFFNETAbV3rcw1COns8vJbgPm5zrGiSeO9GZPRshQ@mail.gmail.com>
References: <5675f9f771f04d9f8b5cffe16f4a4175@EX13MBX02.gb.ad.corp>
<CAHOFxGrPiuFFNETAbV3rcw1COns8vJbgPm5zrGiSeO9GZPRshQ@mail.gmail.com>
Queries against tables with a lot of partitions (> 1000) start to incur
an increasing planning time duration even with the current version,
V11. V12 purportedly has fixed this problem, allowing thousands of
partitioned tables without a heavy planning cost. Can't seem to find
the threads on this topic, but there are out there. I personally noted
a gigantic increase in planning time once I got past 1500 partitioned
tables in V11.
On another note, hopefully they have fixed runtime partition pruning in
V12 since V11 introduced it but some query plans don't use it, so you
have to reconstruct some queries to sub queries to make it work correctly.
Regards,
Michael Vitale
Michael Lewis wrote on 8/12/2019 3:05 PM:
> "It is also important to consider the overhead of partitioning during
> query planning and execution. The query planner is generally able to
> handle partition hierarchies with */up to a few hundred partitions
> fairly well/*, provided that typical queries allow the query planner
> to prune all but a small number of partitions. Planning times become
> longer and memory consumption becomes higher as more partitions are
> added." (emphasis added)
>
> --https://www.postgresql.org/docs/current/ddl-partitioning.html
view thread (6+ messages) latest in thread
Message-ID: <458dfc43-b097-29f3-4e0e-857b9c30b427@sqlexec.com> Permalink: ../458dfc43-b097-29f3-4e0e-857b9c30b427@sqlexec.com/ Also on: postgresql.org/message-id/458dfc43-b097-29f3-4e0e-857b9c30b427@sqlexec.com ·
reply
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Reply to all the recipients using the --to and --cc options: reply via email To: pgsql-performance@postgresql.org Cc: MichaelDBA@sqlexec.com, mlewis@entrata.com, piotr.wlodarczyk@gnb.pl, pgsql-performance@lists.postgresql.org Subject: Re: Planner performance in partitions In-Reply-To: <458dfc43-b097-29f3-4e0e-857b9c30b427@sqlexec.com> * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox