Received: from localhost (unknown [200.46.204.183]) by developer.postgresql.org (Postfix) with ESMTP id B45932E0044 for ; Wed, 4 Jun 2008 18:30:18 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 34214-05 for ; Wed, 4 Jun 2008 18:30:11 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from web37304.mail.mud.yahoo.com (web37304.mail.mud.yahoo.com [209.191.90.247]) by developer.postgresql.org (Postfix) with SMTP id A15272E0039 for ; Wed, 4 Jun 2008 18:30:14 -0300 (ADT) Received: (qmail 7797 invoked by uid 60001); 4 Jun 2008 21:30:13 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Received:X-Mailer:Date:From:Subject:To:Cc:MIME-Version:Content-Type:Message-ID; b=sCK/eZ1TjQbxHqOshYTJRMu6VWgfgvqA6xa2SMN7xEhow7gnjJ9zS0MYntlg2KUHVdupfgSEjb7IzQ8/Cjy1wp/eVcilOUOSseWKYo/xiZ/Zpjc42rgZuVwNqnn2vB0qE4PlvDgOyj1gZ7oG4QltnnqNqr7aSy3YWVCfYyNH4bE=; Received: from [66.226.193.82] by web37304.mail.mud.yahoo.com via HTTP; Wed, 04 Jun 2008 14:30:13 PDT X-Mailer: YahooMailRC/975.41 YahooMailWebService/0.7.199 Date: Wed, 4 Jun 2008 14:30:13 -0700 (PDT) From: andrew klassen Subject: Re: insert/update tps slow with indices on table > 1M rows To: James Mansion Cc: pgsql-performance@postgresql.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1473167840-1212615013=:6724" Message-ID: <354284.6724.qm@web37304.mail.mud.yahoo.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200806/29 X-Sequence-Number: 30379 --0-1473167840-1212615013=:6724 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable I am using the c-library interface and for these particular transactions=0A= I preload PREPARE statements. Then as I get requests, I issue a BEGIN, =0Af= ollowed by at most 300 EXECUTES and then a COMMIT. That is the=0Ageneral sc= enario. What value beyond 300 should I try? =0AAlso, how=A0might COPY (whic= h involves file I/O) improve the =0Aabove scenario? =0AThanks.=0A=0A=0A----= - Original Message ----=0AFrom: James Mansion =0ATo: andrew klassen =0ACc: pgsql-performance@postg= resql.org=0ASent: Wednesday, June 4, 2008 3:20:26 PM=0ASubject: Re: [PERFOR= M] insert/update tps slow with indices on table > 1M rows=0A=0Aandrew klass= en wrote:=0A> I'll try adding more threads to update the table as you sugge= st.=0AYou could try materially increasing the update batch size too.=A0 As = an =0Aexercise you could=0Asee what the performance of COPY is by backing o= ut the data and =0Areloading it from=0Aa suitable file.=0A=0A=0A --0-1473167840-1212615013=:6724 Content-Type: text/html; charset=us-ascii

 

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?

 

Also, how might COPY (which involves file I/O) improve the

above scenario?

 

Thanks.

----- Original Message ----
From: James Mansion <james@mansionfamily.plus.com>
To: andrew klassen <aptklassen@yahoo.com>
Cc: pgsql-performance@postgresql.org
Sent: Wednesday, June 4, 2008 3:20:26 PM
Subject: Re: [PERFORM] insert/update tps slow with indices on table > 1M rows

andrew klassen wrote:
> I'll try adding more threads to update the table as you suggest.
You could try materially increasing the update batch size too.  As an
exercise you could
see what the performance of COPY is by backing out the data and
reloading it from
a suitable file.


--0-1473167840-1212615013=:6724--