Re: One tablespace or several tablespaces

From: Begin Daniel <jfd553(at)hotmail(dot)com>
To: Kevin Grittner <kgrittn(at)gmail(dot)com>, JORGE MALDONADO <jorgemal1960(at)gmail(dot)com>
Cc: "pgsql-novice(at)postgresql(dot)org" <pgsql-novice(at)postgresql(dot)org>
Subject: Re: One tablespace or several tablespaces
Date: 2016-04-11 14:56:48
Message-ID: CY1PR10MB047486470D266504E2A3484D94940@CY1PR10MB0474.namprd10.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

-----Original Message-----
From: pgsql-novice-owner(at)postgresql(dot)org [mailto:pgsql-novice-owner(at)postgresql(dot)org] On Behalf Of Kevin Grittner
Sent: April-11-16 09:40
To: JORGE MALDONADO
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: [NOVICE] One tablespace or several tablespaces

On Sat, Apr 2, 2016 at 1:42 PM, JORGE MALDONADO <jorgemal1960(at)gmail(dot)com> wrote:
> I am developing an information system that will be used by several
> clientes, each client has its own database, and each database has
> exactly the same structure for each client. The only difference is the name of the database.
> I have been thinking about whether or not using one tablespace to
> create all of the databases or to use one tablespace for each
> database, but I have not found a good reason for using one method or the other.

Generally I have found it best to use a single tablespace except when there is a clear reason to do otherwise. Usually that reason, if it exists, is to allow storing less frequently accessed data on a slow, cheaper medium.
--------
Another reason to use multiple tablespaces is if IO operations are slowing down significantly because the queries have to access several large tables at the same time (i.e. read/write tens of GB by table). In this case, it might be a good idea to distribute IO operations by spreading on several disks the tables that are often used together.

Otherwise (smaller tables or expensive queries are only sporadic), keep everything together as Kevin suggested.

Daniel

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Albe Laurenz 2016-04-11 15:32:50 Re: One tablespace or several tablespaces
Previous Message Kevin Grittner 2016-04-11 13:40:30 Re: One tablespace or several tablespaces