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

From: Thomas Kellerer <spam_eater(at)gmx(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Clustered index to preserve data locality in a multitenant application?
Date: 2016-08-30 11:39:03
Message-ID: nq3r8m$3ol$1@blaine.gmane.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 requirements pretty much as I understand them.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Mike Sofen 2016-08-30 12:30:54 Re: Re: Clustered index to preserve data locality in a multitenant application?
Previous Message Nicolas Grilly 2016-08-30 11:12:33 Clustered index to preserve data locality in a multitenant application?