Re: multicolumn partitioning help

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: James Robertson <james(at)jsrobertson(dot)net>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: multicolumn partitioning help
Date: 2023-03-15 07:37:39
Message-ID: 4ab9371f1eb13334fe5cece7e788d9c8d5be08f6.camel@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Tue, 2023-03-14 at 19:33 -0400, James Robertson wrote:
> Laurenz your solution is how I thought I would work around my (lack of) understanding
> of partitioning. (nested partitions).
> I was hesitant because I didn't know what sort of performance problems I would create for myself.
>
> [...] more performance [...]

If you are thinking of subpartitioning primarily in terms of boosting performance,
you should know that you only get performance benefits from partitioning with
very special queries that effectively have to be designed together with the
partitioning strategy. Other statements typically become somewhat slower
through partitioning.

So it is really impossible to discuss performance benefits without knowing
the exact query. It may be best if you build a play database with realistic amounts
of test data and use EXPLAIN and EXPLAIN (ANALYZE) to see the effects that
partitioning has on your queries.

Yours,
Laurenz Albe

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message David Rowley 2023-03-15 20:46:28 Re: multicolumn partitioning help
Previous Message James Robertson 2023-03-14 23:33:11 Re: multicolumn partitioning help