pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Justin Pryzby <pryzby@telsasoft.com>
To: Oleksandr Shulgin <oleksandr.shulgin@zalando.de>
Cc: pgsql-performance@lists.postgresql.org
Subject: Re: When to use PARTITION BY HASH?
Date: Wed, 3 Jun 2020 10:09:59 -0500
Message-ID: <20200603150959.GP30144@telsasoft.com> (raw)
In-Reply-To: <CACACo5QUUG0KoTq8uFjtW9Bpqr7d8s=dGDdjxq0R+-YfNs6KPQ@mail.gmail.com>
References: <CACACo5StuUuFox+65KQHB8u+51kMUcEeQuV=XmsUv7d8VnaO7A@mail.gmail.com>
	<20200602173353.GB30144@telsasoft.com>
	<CACACo5QUUG0KoTq8uFjtW9Bpqr7d8s=dGDdjxq0R+-YfNs6KPQ@mail.gmail.com>

On Wed, Jun 03, 2020 at 09:45:48AM +0200, Oleksandr Shulgin wrote:
> I see.  So it works with low cardinality in the partitioned column.  With
> high cardinality an index scan on an unpartitioned table would be
> preferable I guess.
> 
> The documentation page I've linked only contains examples around
> partitioning BY RANGE.  I believe it'd be helpful to extend it with some
> meaningful examples for LIST and HASH partitioning.

I agree.  I think it would also be useful to mention the "benefits" which
aren't likely to apply to hash partitioning.

Would you want to propose an example to include ?
Eventually it needs to be submitted as a patch to -hackers.

-- 
Justin





view thread (22+ messages)  latest in thread

Message-ID: <20200603150959.GP30144@telsasoft.com>
Permalink:  ../20200603150959.GP30144@telsasoft.com/
Also on:    postgresql.org/message-id/20200603150959.GP30144@telsasoft.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: pryzby@telsasoft.com, oleksandr.shulgin@zalando.de, pgsql-performance@lists.postgresql.org
  Subject: Re: When to use PARTITION BY HASH?
  In-Reply-To: <20200603150959.GP30144@telsasoft.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