pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Barry Lind <blind@xythos.com>
To: Rafal Kedziorski <rafcio@polonium.de>
Cc: pgsql-jdbc@postgresql.org
Cc: pgsql-performance@postgresql.org
Subject: Re: Good performance?
Date: Mon, 17 Feb 2003 09:50:26 -0800
Message-ID: <3E5120E2.30401@xythos.com> (raw)
In-Reply-To: <3E50A78D.9000806@polonium.de>
References: <5.2.0.9.0.20030216232710.01b40810@mail.polonium.de>
	<3E5068CD.4050909@xythos.com>
	<3E50A78D.9000806@polonium.de>

Rafal,

I would expect things to be slower with a commit after each insert, 
since it is the commit that forces the data to be written to disk. 
However 50x seems a bit much and I think is due to cygwin performance.

I ran your code on my laptop running RH7.3 and get the following results:

Running with autocommit on:
InsertFirmSQLInt8() needed 5129 for creating 1000 entries
InsertFirmSQLInt8() needed 5417 for creating 1000 entries
InsertFirmSQLInt8() needed 4976 for creating 1000 entries
InsertFirmSQLInt8() needed 4162 for creating 1000 entries

Running with autocommit off:
InsertFirmSQLInt8() needed 1250 for creating 1000 entries
InsertFirmSQLInt8() needed 932 for creating 1000 entries
InsertFirmSQLInt8() needed 1000 for creating 1000 entries
InsertFirmSQLInt8() needed 1321 for creating 1000 entries
InsertFirmSQLInt8() needed 1248 for creating 1000 entries

On linux I see about a 5x slowdown which is more in line with what I 
would expect.

thanks,
--Barry


Rafal Kedziorski wrote:
> hi,
> 
> Barry Lind wrote:
> 
>> Rafal,
>>
>> Performance of postgres running under cygwin isn't great.  Can you try 
>> the same test on a different platform?  It also looks like you are 
>> running in autocommit mode.  You should see a significant performance 
>> improvement if you batch your commits in say groups of 1000 inserts 
>> per commit. 
> 
> 
> after set autocommit false, I need 0,9 - 1,04 seconds for insert 1000 
> new entries into my table. is this normal, that autocommit false is 
> 40-50 times slower?
> 
> 
> Rafal
> 
>> thanks,
>> --Barry
> 
> 
> 
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
> 





view thread (11+ messages)  latest in thread

Message-ID: <3E5120E2.30401@xythos.com>
Permalink:  ../3E5120E2.30401@xythos.com/
Also on:    postgresql.org/message-id/3E5120E2.30401@xythos.com

 · 

reply

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: blind@xythos.com, rafcio@polonium.de, pgsql-jdbc@postgresql.org
  Subject: Re: Good performance?
  In-Reply-To: <3E5120E2.30401@xythos.com>
  References: <5.2.0.9.0.20030216232710.01b40810@mail.polonium.de> <3E5068CD.4050909@xythos.com> <3E50A78D.9000806@polonium.de> <3E5120E2.30401@xythos.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