Re: When to use PARTITION BY HASH? - Mailing list pgsql-general

From Ron
Subject Re: When to use PARTITION BY HASH?
Date
Msg-id fa380e6c-301b-3db4-4ce3-75f7af660637@gmail.com
Whole thread Raw
In response to Re: When to use PARTITION BY HASH?  (Jeff Janes <jeff.janes@gmail.com>)
List pgsql-general
On 6/5/20 8:51 AM, Jeff Janes wrote:
On Fri, Jun 5, 2020 at 6:12 AM Oleksandr Shulgin <oleksandr.shulgin@zalando.de> wrote:
[snip]
For a bulk load you'd likely want to go with an empty partition w/o indexes and build them later, after loading the tuples. 

That only works if the bulk load is starting from zero.  If you are adding a million rows to something that already has 100 million, you would probably spend more time rebuilding the indexes than you saved by dropping them.

It's too bad that Postgres doesn't have "deferred index updates" during bulk (but still transactional) loads, where the index nodes are updated en masse every "commit count" number of rows.  That's really useful in this situation, but I've only seen it in one legacy RDBMS.

--
Angular momentum makes the world go 'round.

pgsql-general by date:

Previous
From: Tim Cross
Date:
Subject: Re: Should I enforce ssl/local socket use?
Next
From: Wenjun Che
Date:
Subject: Question on full vacuum clearing waste space