Re: Should we warn against using too many partitions?

From: Justin Pryzby <pryzby(at)telsasoft(dot)com>
To: David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>
Cc: Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>, Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Should we warn against using too many partitions?
Date: 2019-06-06 18:54:55
Message-ID: 20190606185455.GC3079@telsasoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Jun 07, 2019 at 06:46:59AM +1200, David Rowley wrote:
> On Thu, 6 Jun 2019 at 17:29, Justin Pryzby <pryzby(at)telsasoft(dot)com> wrote:
> > >+
> > >+ <sect2 id="ddl-partitioning-declarative-best-practices">
> > >+ <title>Declarative Partitioning Best Practices</title>
> > >+
> > >+ <para>
> > >+ The choice of how to partition a table should be considered carefully as
> >
> > Either say "How to partition consider should be .." or "The choice should MADE carefully" ?
>
> I've changed "considered" to "made". I'm unable to make sense of the
> first suggestion there :(

The first option was intended to be:
|How to partition a table should be considered carefully.

(The idea being that the "choice" doesn't need to be considered carefully but
the thing itself).

> > >+ critical decision to make. Not having enough partitions may mean that
> > >+ indexes remain too large and that data locality remains poor which could
> > >+ result in poor cache hit ratios. However, dividing the table into too
> > >+ many partitions can also cause issues. Too many partitions can mean
> > >+ slower query planning times and higher memory consumption during both
> > >+ query planning and execution. It's also important to consider what
> > >+ changes may occur in the future when choosing how to partition your table.
> > >+ For example, if you choose to have one partition per customer and you
> > >+ currently have a small number of large customers, what will the
> >
> > have ONLY ?
>
> I assume you mean after the "have" before "one partition per
> customer"?

No, I meant "currently have ONLY".

> I don't quite understand that since in the scenario we're
> partitioning by customer, so it's not possible to have more than one
> partition per customer, only the reverse is possible. It seems to me
> injecting "only" there would just confuse things.

Thanks,
Justin

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Rowley 2019-06-06 18:59:51 Re: Should we warn against using too many partitions?
Previous Message David Rowley 2019-06-06 18:46:59 Re: Should we warn against using too many partitions?