pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tomas Vondra <tv@fuzzy.cz>
To: Gauri Kanekar <meetgaurikanekar@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Partitioning
Date: Tue, 30 Jan 2007 08:10:14 +0100
Message-ID: <45BEEF56.60604@fuzzy.cz> (raw)
In-Reply-To: <7e4ba9550701120340s4d8ea6b6jebf24eb67aeff7c6@mail.gmail.com>
References: <7e4ba9550701120340s4d8ea6b6jebf24eb67aeff7c6@mail.gmail.com>

> Can anybody help me out
>  
> I just wanted to knw what will be the configuraion settings for
> partitioning table so as to make inserts faster on the partitioned tables.

Well, that depends. Many questions are important here. Will you insert
into several partitions or only to a single one? Do you need to enforce
some constraint between several partitioned tables?

If you need to insert into several partitions, it can be faster as you
can place them on different drives. If you need to insert only into the
last one (that's usually the case with 'logging' tables) then this
probably won't give a huge performance benefit.

If you need to enforce some kind of constraint between multiple
partitions (possibly from several tables), you'll have to do that
manually using a plpgsql procedure (for example). This is the case with
UNIQUE constraint on a single table, FOREIGN KEY between multimple
partitioned tables, etc. This can mean a serious performance penalty,
esecially when you do mostly insert/update on that table.

This is mostly about application architecture - if you use partitions
incorrectly it's almost impossible to fix that by changing settings in
postgresql.conf.

Tomas



view thread (33+ messages)  latest in thread

Message-ID: <45BEEF56.60604@fuzzy.cz>
Permalink:  ../45BEEF56.60604@fuzzy.cz/
Also on:    postgresql.org/message-id/45BEEF56.60604@fuzzy.cz

 · 

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-performance@postgresql.org
  Cc: tv@fuzzy.cz, meetgaurikanekar@gmail.com
  Subject: Re: Partitioning
  In-Reply-To: <45BEEF56.60604@fuzzy.cz>

* 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