Re: Clustered index to preserve data locality in a multitenant application? - Mailing list pgsql-general

From Thomas Kellerer
Subject Re: Clustered index to preserve data locality in a multitenant application?
Date
Msg-id nq3r8m$3ol$1@blaine.gmane.org
Whole thread Raw
In response to Clustered index to preserve data locality in a multitenant application?  (Nicolas Grilly <nicolas@gardentechno.com>)
Responses Re: Re: Clustered index to preserve data locality in a multitenant application?  ("Mike Sofen" <msofen@runbox.com>)
List pgsql-general
Nicolas Grilly schrieb am 30.08.2016 um 13:12:
> We rely on clustered indexes to preserve data locality for each
> tenant. Primary keys start with the tenant ID. This way, rows
> belonging to the same tenant are stored next to each other. Because
> all requests hit only one tenant, this is a great performance
> improvement.
>

What about partitioning by tenant? With a local index on each partition.

Partitioning is currently a bit limited in Postgres (e.g. you can't have incoming foreign keys) but this would fit your
requirementspretty much as I understand them.  


pgsql-general by date:

Previous
From: Nicolas Grilly
Date:
Subject: Clustered index to preserve data locality in a multitenant application?
Next
From: "Mike Sofen"
Date:
Subject: Re: Re: Clustered index to preserve data locality in a multitenant application?