Re: An Inesrt on a partitioned table become very slow

From: David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>
To: Fabio Pardi <f(dot)pardi(at)portavita(dot)eu>
Cc: pgsql-novice(at)lists(dot)postgresql(dot)org
Subject: Re: An Inesrt on a partitioned table become very slow
Date: 2018-07-09 10:31:02
Message-ID: CAKJS1f-+JFU9Ev0t39_VrkcWV90cWas=DTNwGjkB9_cR+daQOg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On 9 July 2018 at 21:16, Fabio Pardi <f(dot)pardi(at)portavita(dot)eu> wrote:
> It is very likely that most of the time is spent by the query planner.

Unless the INSERTs have a SELECT clause, then the query planner's job
is pretty minimal for INSERTs. Most of the overhead will come from
ExecSetupPartitionTupleRouting(). This will become a little faster in
pg11 (once released), but only slightly, and a bunch of other things
means that partitioning just does not scale well to
that number of partitions. Most of those are in the planner. Some of
those are also faster in pg11 (partition pruning), but also there's
still quite a bit to do before partitioning will scale well to this
number of partitions.

--
David Rowley http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Steve Baldwin 2018-07-10 22:41:23 Type of text literals
Previous Message Fabio Pardi 2018-07-09 09:16:24 Re: An Inesrt on a partitioned table become very slow