Re: Scalability question

From: tv(at)fuzzy(dot)cz
To: "Zoltan Boszormenyi" <zb(at)cybertec(dot)at>
Cc: "PostgreSQL Performance" <pgsql-performance(at)postgresql(dot)org>, "Hans-Juergen Schoenig" <hs(at)cybertec(dot)at>
Subject: Re: Scalability question
Date: 2008-06-11 10:15:41
Message-ID: 13093.217.77.161.17.1213179341.squirrel@sq.gransy.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

> Hi,
>
> I got a question about scalability in high volume insert situation
> where the table has a primary key and several non-unique indexes
> on other columns of the table. How does PostgreSQL behave
> in terms of scalability? The high volume of inserts comes from
> multiple transactions.
>
> Best regards,
> Zoltán Böszörményi

Well, that's a difficult question as it depends on hardware and software,
but with a proper tunning the results may be very good. Just do the basic
PostgreSQL tuning and then tune it for the INSERT performance if needed.
It's difficult to give any other recommendations without a more detailed
knowledge of the problem, but consider these hints:

1) move the pg_xlog to a separate drive (so it's linear)
2) move the table with large amount of inserts to a separate tablespace
3) minimize the amount of indexes etc.

The basic rule is that each index adds some overhead to the insert, but it
depends on datatype, etc. Just prepare some data to import, and run the
insert with and without the indexes and compare the time.

Tomas

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Zoltan Boszormenyi 2008-06-11 10:35:54 Re: Scalability question
Previous Message Zoltan Boszormenyi 2008-06-11 09:56:04 Scalability question