Re: An Inesrt on a partitioned table become very slow
David Rowley <[email protected]>
| Newsgroups | gmane.comp.db.postgresql.novice |
|---|---|
| Message-ID | <CAKJS1f-+JFU9Ev0t39_VrkcWV90cWas=DTNwGjkB9_cR+daQOg@mail.gmail.com> |
On 9 July 2018 at 21:16, Fabio Pardi <[email protected]> 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