Re: performance problems inserting random vals in index - Mailing list pgsql-general

From Tom Lane
Subject Re: performance problems inserting random vals in index
Date
Msg-id 17147.1271696670@sss.pgh.pa.us
Whole thread Raw
In response to performance problems inserting random vals in index  (Leonardo F <m_lists@yahoo.it>)
Responses Re: performance problems inserting random vals in index  (Scott Marlowe <scott.marlowe@gmail.com>)
Re: performance problems inserting random vals in index  (Leonardo F <m_lists@yahoo.it>)
List pgsql-general
Leonardo F <m_lists@yahoo.it> writes:
> I have a simple table that has indexes on 2 integer columns.
> Data is inserted very often (no updates, no deletes, just inserts):
> at least 4000/5000 rows per second.
> The input for the 2 indexed columns is very random.

> Everything is "fine" for the first 10-20M rows; after that, performance
> gets worse and worse, and by 50M rows I can't insert more than
> 1500 rows per second.

> How can I improve it?

Does it help to reindex the index at that point?

> 1) the table is already partitioned; at the moment it's based on
> 30 partitions. What kind of "select" performance impact would I
> hit going to 3000 partitions?

Bad.  The partitioning code isn't designed to scale beyond a few dozen
partitions.

            regards, tom lane

pgsql-general by date:

Previous
From: Vasiliy G Tolstov
Date:
Subject: Re: best solution to backup full user databse
Next
From: Scott Marlowe
Date:
Subject: Re: performance problems inserting random vals in index