Re: Should I partition this table?

From: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
To: AlexK <alkuzo(at)gmail(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Should I partition this table?
Date: 2014-07-10 20:23:11
Message-ID: CAMkU=1yC69kXgqHJxgQ6pH1FS+0HHW3iLMZUST=av5hXMCQg+g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Jul 10, 2014 at 11:36 AM, AlexK <alkuzo(at)gmail(dot)com> wrote:

> Kevin,
>
> What would be the advantages of partitioning on ranges of ParentID? Each
> query will touch at most one partition. I might or might not get PK indexes
> one level of depth less.
>
> I understand that I will CLUSTER these smaller tables and benefit from
> that.
> Other than clustering, what are other advantages?
>

If you don't partition, it will take an unacceptably long time to run
CLUSTER on the entire table. If you do partition, you can CLUSTER one
partition at a time, and only need to CLUSTER the fast-changing partitions
more than once. But based on your description, you probably don't need to
run explicit CLUSTERs anyway as your data would end up naturally clustered.

Cheers,

Jeff

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Aram Fingal 2014-07-10 20:40:28 invalid connection type "listen_addresses='*'
Previous Message Jeff Janes 2014-07-10 20:16:05 Re: Should I partition this table?