From: Heikki Linnakangas <heikki@enterprisedb.com>
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: Thu, 05 Jun 2008 09:18:29 +0300
Message-ID: <48478535.2010905@enterprisedb.com> (raw)
In-Reply-To: <354284.6724.qm@web37304.mail.mud.yahoo.com>
References: <354284.6724.qm@web37304.mail.mud.yahoo.com>
andrew klassen wrote:
> 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?
Make sure you use the asynchronous PQsendQuery, instead of plain PQexec.
Otherwise you'll be doing a round-trip for each EXECUTE anyway
regardless of the batch size. Of course, if the bottleneck is somewhere
else, it won't make a difference..
--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com
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: heikki@enterprisedb.com, aptklassen@yahoo.com, james@mansionfamily.plus.com
Subject: Re: insert/update tps slow with indices on table > 1M rows
In-Reply-To: <48478535.2010905@enterprisedb.com>
* 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