Re: Time to move table to new tablespace

From: Ondrej Ivanič <ondrej(dot)ivanic(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Time to move table to new tablespace
Date: 2012-01-09 01:54:51
Message-ID: CAM6mieLUk36VDCTcWgfsKcBJmZfY9PZ5QGKz=NN78cqvjQ00Gw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

On 8 January 2012 01:52, Jason Buberel <jason(at)altosresearch(dot)com> wrote:
> psql> create tablespace 'newstorage' location '/some/new/path';
> psql> alter table city_summary set tablespace = 'newstorage';

Be aware that you are not going to move indexes (see ALTER INDEX name
SET TABLESPACE tablespace_name). Maybe you don't have to move data and
I would be worth to move indexes only. So you ended up with data and
index tablespace and reduce random_page_cost when you query your
table.

--
Ondrej Ivanic
(ondrej(dot)ivanic(at)gmail(dot)com)

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Chris Angelico 2012-01-09 03:58:02 Lock/deadlock issues with priority queue in Postgres - possible VACUUM conflicts
Previous Message Jon Nelson 2012-01-09 01:53:59 Re: Duplicated entries are not ignored even if a "do instead nothing" rule is added.