From: Stephen Frost <sfrost@snowman.net>
To: Igor Chudov <ichudov@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Postgres INSERT performance and scalability
Date: Mon, 19 Sep 2011 21:15:51 -0400
Message-ID: <20110920011551.GQ12765@tamriel.snowman.net> (raw)
In-Reply-To: <CAMhtkAby8zyEr-CdHqp1YtanbAUYFMumrH_ooG_=H4GkQqD7bg@mail.gmail.com>
References: <CAMhtkAb1F1SOyz1mzeeWaQehoqtzk29oLVVG=NzKEoGS9bPDNg@mail.gmail.com>
<CAOR=d=3YBs==367X6HpHM82YybfpxRHTirvrmEejrtzEoD6thg@mail.gmail.com>
<CAMhtkAby8zyEr-CdHqp1YtanbAUYFMumrH_ooG_=H4GkQqD7bg@mail.gmail.com>
* Igor Chudov (ichudov@gmail.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
Attachments:
signature.asc (application/pgp-signature, 197B) download
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: sfrost@snowman.net, ichudov@gmail.com
Subject: Re: Postgres INSERT performance and scalability
In-Reply-To: <20110920011551.GQ12765@tamriel.snowman.net>
* 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