pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Simon Liesenfeld <surgeonde@yahoo.de>
To: pgsql-admin@postgresql.org <pgsql-admin@postgresql.org>
Subject: Re: Poverty Partitioning, include indexes
Date: Wed, 31 Oct 2018 07:47:07 +0100
Message-ID: <da5a25fa6ed9548dae3af92feb64f87ff40f962f.camel@cybertec.at> (raw)
In-Reply-To: <1102548183.19607699.1540963534074@mail.yahoo.com>
References: <1102548183.19607699.1540963534074.ref@mail.yahoo.com>
	<1102548183.19607699.1540963534074@mail.yahoo.com>

Simon Liesenfeld wrote:
> Before Diving into the new partitioning methods, of which I assume, that  they imply constraints on the used data model,
> I observed, that a  table is a file, e.g. data/base/1234/5678 .  As soon the files size exceeds
> 1 Gig, more files will be created, 5678.1 for the next Gig, 5678.2 for another , and  so on.
> I had 10 of them for my CTE test table.
> 
> I brought down the pg-server, moved the ones with odd extension number to another  disk  and created 
> symbolic links in  data/base/1234/ pointing to the moved files.
> I restarted the pg-server, I was surprised, that everything still worked well,  and I think,
> I noticed some speedup of my query. I assume, that is, because pg gathers the data of the files
> in parallel, and two disk can shuffle more data in the same time than one disk.
> 
> Is this a recommendable practice? Is it supported by postgres to do this by CREATE TABLE, Alter table?
> Can somebody confirm the performance gain, does it even improve  with more disks?

No, it is not recommended, it will break your database.
Don't manually mess with the table files.

If you want to place some partitions on a different disk, create a tablespace
on that disk and ALTER the tables to move them there.

Depending on your system and query, placing different partitions on
different disks can improve your performance, particularly if I/O is
the bottleneck.

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com





view thread (2+ messages)

Message-ID: <da5a25fa6ed9548dae3af92feb64f87ff40f962f.camel@cybertec.at>
Permalink:  ../da5a25fa6ed9548dae3af92feb64f87ff40f962f.camel@cybertec.at/
Also on:    postgresql.org/message-id/da5a25fa6ed9548dae3af92feb64f87ff40f962f.camel@cybertec.at

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: laurenz.albe@cybertec.at, surgeonde@yahoo.de
  Subject: Re: Poverty Partitioning, include indexes
  In-Reply-To: <da5a25fa6ed9548dae3af92feb64f87ff40f962f.camel@cybertec.at>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox