From: Tom Lane <tgl@sss.pgh.pa.us>
To: andrew klassen <aptklassen@yahoo.com>
Cc: James Mansion <james@mansionfamily.plus.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: insert/update tps slow with indices on table > 1M rows
Date: Wed, 04 Jun 2008 18:52:19 -0400
Message-ID: <6656.1212619939@sss.pgh.pa.us> (raw)
In-Reply-To: <354284.6724.qm@web37304.mail.mud.yahoo.com>
References: <354284.6724.qm@web37304.mail.mud.yahoo.com>
andrew klassen <aptklassen@yahoo.com> writes:
> I am using the c-library interface and for these particular transactions
> I preload PREPARE statements. Then as I get requests, I issue a BEGIN,
> followed by at most 300 EXECUTES and then a COMMIT. That is the
> general scenario. What value beyond 300 should I try?
Well, you could try numbers in the low thousands, but you'll probably
get only incremental improvement.
> Also, how might COPY (which involves file I/O) improve the
> above scenario?
COPY needn't involve file I/O. If you are using libpq you can push
anything you want into PQputCopyData. This would involve formatting
the data according to COPY's escaping rules, which are rather different
from straight SQL, but I doubt it'd be a huge amount of code. Seems
worth trying.
regards, tom lane
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: tgl@sss.pgh.pa.us, aptklassen@yahoo.com, james@mansionfamily.plus.com
Subject: Re: insert/update tps slow with indices on table > 1M rows
In-Reply-To: <6656.1212619939@sss.pgh.pa.us>
* 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