From: | Barry Lind <blind(at)xythos(dot)com> |
---|---|
To: | Rafal Kedziorski <rafcio(at)polonium(dot)de> |
Cc: | pgsql-jdbc(at)postgresql(dot)org, pgsql-performance(at)postgresql(dot)org |
Subject: | Re: Good performance? |
Date: | 2003-02-17 17:50:26 |
Message-ID: | 3E5120E2.30401@xythos.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc pgsql-performance |
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(at)postgresql(dot)org
>
From | Date | Subject | |
---|---|---|---|
Next Message | P G | 2003-02-17 18:01:51 | Support of XA datasources? |
Previous Message | Carl Olivier | 2003-02-17 14:10:07 | Database Instance Creation via Java/JDBC |
From | Date | Subject | |
---|---|---|---|
Next Message | Josh Berkus | 2003-02-17 20:03:58 | Re: [PERFORM] Good performance? |
Previous Message | Manfred Koizar | 2003-02-17 16:49:16 | Re: cost and actual time |