Re: Postgres INSERT performance and scalability

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Igor Chudov <ichudov(at)gmail(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Postgres INSERT performance and scalability
Date: 2011-09-20 01:15:51
Message-ID: 20110920011551.GQ12765@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

* Igor Chudov (ichudov(at)gmail(dot)com) wrote:
> Well, my question is, rather, whether the time to do a bulk INSERT of N
> records into a large table, would take substantially longer than a bulk
> insert of N records into a small table. In other words, does the populating
> time grow as the table gets more and more rows?

Oh, in that regard, the answer would generally be 'no'. PostgreSQL
maintains a table known as the 'free space map', where it keeps track of
where there is 'free space' to insert data into a table. As someone
else mentioned, if there's a lot of indexes then it's possible that the
increased depth in the index due to the larger number of tuples might
mean the larger table is slower, but I don't think it'd make a huge
difference, to be honest...

Are you seeing that behavior? There's nothing like testing it to see
exactly what happens, of course..

Thanks,

Stephen

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Jon Nelson 2011-09-20 01:21:38 Re: Postgres INSERT performance and scalability
Previous Message Igor Chudov 2011-09-20 01:11:44 Re: Postgres INSERT performance and scalability