Re: Clustered index to preserve data locality in a multitenant application?

From: Nicolas Grilly <nicolas(at)vocationcity(dot)com>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Cc: emorrasg(at)yahoo(dot)es
Subject: Re: Clustered index to preserve data locality in a multitenant application?
Date: 2016-08-31 15:33:18
Message-ID: CAG3yVS5dCEozBSqSzL78QJthP9aveRF56JTv71_KxVaAGpgA_g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Eduardo Morras wrote:

> Check BRIN indexs, they are "designed for handling very large tables in
> which certain columns have some natural correlation with their physical
> location within the table", I think they fit your needs.

Yes, a BRIN index on the tenant ID would be very useful if the rows in the
heap were naturally sorted by the tenant ID, but they are not. They are
naturally sorted by their order of insertion, which is completely
unrelated. The first step in solving this is to find a way to keep rows
belonging to the same tenant close to each other. The second step could be
to use a BRIN index.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Nicolas Grilly 2016-08-31 15:40:51 Re: Clustered index to preserve data locality in a multitenant application?
Previous Message Nicolas Grilly 2016-08-31 15:23:50 Re: Clustered index to preserve data locality in a multitenant application?