From sergeyd@ua.fm Mon Aug 11 09:00:03 2003
X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org
Received: from localhost (unknown [64.117.224.130])
by svr1.postgresql.org (Postfix) with ESMTP id E0AE9D1C4B9
for ;
Mon, 11 Aug 2003 09:00:03 +0000 (GMT)
Received: from svr1.postgresql.org ([64.117.224.193])
by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new,
port 10024) with ESMTP id 65226-08
for ;
Mon, 11 Aug 2003 05:58:35 -0300 (ADT)
Received: from lata.dp.ua (unknown [213.179.230.244])
by svr1.postgresql.org (Postfix) with ESMTP id BE6B0D1C4E3
for ;
Mon, 11 Aug 2003 05:59:46 -0300 (ADT)
Received: from [192.168.0.48] (helo=sergeyd)
by lata.dp.ua with esmtp (Exim 3.22 #1) id 19m8Wq-00027N-00
for pgsql-performance@postgresql.org; Mon, 11 Aug 2003 11:59:48 +0300
From: "Serge Dorofeev"
To:
Subject: How to force PostgreeSQL to work faster?
Date: Mon, 11 Aug 2003 11:59:45 +0300
Organization: .
Message-ID: <000101c35fe6$ea3fea80$3000a8c0@sergeyd>
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="----=_NextPart_000_0002_01C36000.0F8EA920"
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook, Build 10.0.2616
Importance: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
X-Virus-Scanned: by amavisd-new at postgresql.org
X-Spam-Status: No, hits=1.8 tagged_above=0.0 required=5.0
tests=ASCII_FORM_ENTRY, HTML_80_90, HTML_MESSAGE, HTML_TAG_EXISTS_TBODY
X-Spam-Level: *
X-Archive-Number: 200308/161
X-Sequence-Number: 2978
This is a multi-part message in MIME format.
------=_NextPart_000_0002_01C36000.0F8EA920
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit
Hi PostrgeSQL team,
My PostrgeSQL installed as part of CYGWIN (Windows XP).
I have compared performance PostrgeSQL to MS SQL (I used a little Java
program with number of inserts in table).
MS SQL is faster in 12 times :-(
It's very strange results.
Guys who developed this server: what you can tell in this - what
customizations needs to increase of productivity?
How to force PostgreeSQL to work faster?
Speed (inserts/sec) Elapsed time (ms)
MS SQL (Average): 295 39 869
testInsert 5000
263 18 977
255 19 619
306 16 334
testInsert 10000
315 31 716
324 30 905
319 31 325
testInsert 20000
241 82 919
313 63 922
317 63 101
PostrgreSQL (Average): 24 520 160
testInsert 5000
26 191 434
26 191 264
26 192 295
testInsert 10000
22 463 669
25 393 510
24 409 528
testInsert 20000
24 834 911
17 1 184 613
24 820 218
MS SQL is faster (times): 12 13
______________________________________________________
With regards,
Serge.
------=_NextPart_000_0002_01C36000.0F8EA920
Content-Type: text/html;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Message
Hi PostrgeSQL team,
My PostrgeSQL installed as part of CYGW=
IN=20
(Windows XP).
I have compared performance PostrgeSQL to MS SQL (I used a=
=20
little Java program with number of inserts in table).
MS SQL is faster i=
n 12=20
times :-(
It's very strange results.
Guys who developed this server: =
what=20
you can tell in this - what customizations needs to increase of=20
productivity?
How to force PostgreeSQL to work faster?
| |
Speed (inserts/sec)<=
/TD>
| Elapsed time (ms) |
| MS SQL (Average):
| 295=
|
39=20
869 |
| |
testInsert 5000 |
|
| |
263
| 18 977 |
| |
255 |
19 619 |
| |
306 |
16 334 |
| |
|
|
| |
testInsert 10000 |
|
| |
315
| 31 716 |
| |
324
| 30 905 |
| |
319
| 31 325 |
| |
|
|
| |
testInsert 20000 |
|
| |
241
| 82 919 |
| |
313
| 63 922 |
| |
317 |
63 101 |
| |
|
<=
FONT=20
size=3D2> |
| PostrgreSQL (Average): |
24<=
/TD>
| 520=20
160 |
| |
testInsert 5000 |
|
| |
26 |
191 434 |
| |
26 |
191 264 |
| |
26 |
192 295 |
| |
|
|
| |
testInsert 10000 |
|
| |
22 |
463 669 |
| |
25 |
393 510 |
| |
24 |
409 528 |
| |
|
|
| |
testInsert 20000 |
|
| |
24 |
834 911 |
| |
17 |
1 184 613 |
| |
24 |
820 218 |
| MS SQL is faster=20
(times): |
12 |
13 |
___________________________________________________=
___
With=20
regards,
Serge.
------=_NextPart_000_0002_01C36000.0F8EA920--
From tomka@zeus.gau.hu Mon Aug 11 11:38:10 2003
X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org
Received: from localhost (unknown [64.117.224.130])
by svr1.postgresql.org (Postfix) with ESMTP id AA8B8D1C4BA
for ;
Mon, 11 Aug 2003 11:38:10 +0000 (GMT)
Received: from svr1.postgresql.org ([64.117.224.193])
by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new,
port 10024) with ESMTP id 82287-05
for ;
Mon, 11 Aug 2003 08:36:43 -0300 (ADT)
Received: from gate.gau.hu (gate.gau.hu [192.188.242.65])
by svr1.postgresql.org (Postfix) with ESMTP id 21E7FD1C950
for ;
Mon, 11 Aug 2003 08:37:59 -0300 (ADT)
Received: from gate.gau.hu (localhost [127.0.0.1])
by gate.gau.hu (8.11.6+Sun/8.11.6/1.0) with ESMTP id h7BBc1t15850
for ;
Mon, 11 Aug 2003 13:38:01 +0200 (MEST)
Received: from zeus.gau.hu (zeus.gau.hu [192.188.242.66])
by gate.gau.hu (8.11.6+Sun/8.11.6/1.0) with ESMTP id h7BBc0Y15846;
Mon, 11 Aug 2003 13:38:00 +0200 (MEST)
Received: by zeus.gau.hu (Postfix, from userid 1004)
id 5D0FD6FCCC; Mon, 11 Aug 2003 13:37:50 +0200 (CEST)
Received: from localhost (localhost [127.0.0.1])
by zeus.gau.hu (Postfix) with ESMTP
id 546137F67F; Mon, 11 Aug 2003 13:37:50 +0200 (CEST)
Date: Mon, 11 Aug 2003 13:37:50 +0200 (CEST)
From: Tomka Gergely
To: Serge Dorofeev
Cc:
Subject: Re: How to force PostgreeSQL to work faster?
In-Reply-To: <000101c35fe6$ea3fea80$3000a8c0@sergeyd>
Message-ID:
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=iso-8859-2
Content-Transfer-Encoding: QUOTED-PRINTABLE
X-Virus-Scanned: by amavisd-new at postgresql.org
X-Spam-Status: No, hits=2.9 tagged_above=0.0 required=5.0 tests=IN_REP_TO,
RCVD_IN_NJABL, RCVD_IN_OSIRUSOFT_COM, RCVD_IN_RFCI,
RCVD_IN_UNCONFIRMED_DSBL, USER_AGENT_PINE
X-Spam-Level: **
X-Archive-Number: 200308/163
X-Sequence-Number: 2980
Hi!
Please send me the test db and the queries, with precise information
maybe the developers can help.
--=20
Tomka Gergely
"S most - vajon barb=E1rok n=E9lk=FCl mi lesz vel=FCnk?
=D5k m=E9giscsak megold=E1s voltak valahogy..."
From paul@tmsl.demon.co.uk Mon Aug 11 12:31:01 2003
X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org
Received: from localhost (unknown [64.117.224.130])
by svr1.postgresql.org (Postfix) with ESMTP id BEE48D1C4B9
for ;
Mon, 11 Aug 2003 12:31:01 +0000 (GMT)
Received: from svr1.postgresql.org ([64.117.224.193])
by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new,
port 10024) with ESMTP id 88704-03
for ;
Mon, 11 Aug 2003 09:29:35 -0300 (ADT)
Received: from curry.tmsl.demon.co.uk (tmsl-adsl.demon.co.uk [80.177.114.181])
by svr1.postgresql.org (Postfix) with ESMTP id 1ED52D1C514
for ;
Mon, 11 Aug 2003 09:30:50 -0300 (ADT)
Received: from bacon.tmsl.demon.co.uk (bacon.tmsl.demon.co.uk [192.168.7.102])
by curry.tmsl.demon.co.uk (8.11.6/8.11.6) with ESMTP id h7BCUZ910986;
Mon, 11 Aug 2003 13:30:35 +0100
Date: Mon, 11 Aug 2003 13:30:33 +0100
From: Paul Thomas
To: Serge Dorofeev
Cc: "pgsql-performance @ postgresql . org"
Subject: Re: How to force PostgreeSQL to work faster?
Message-ID: <20030811133033.A25244@bacon>
References: <000101c35fe6$ea3fea80$3000a8c0@sergeyd>
Mime-Version: 1.0
Content-Type: text/plain; format=flowed; charset=ISO-8859-1
In-Reply-To: <000101c35fe6$ea3fea80$3000a8c0@sergeyd>;
from sergeyd@ua.fm on Mon, Aug 11, 2003 at 09:59:45 +0100
X-Mailer: Balsa 1.2.3
Lines: 67
X-Virus-Scanned: by amavisd-new at postgresql.org
X-Archive-Number: 200308/164
X-Sequence-Number: 2981
On 11/08/2003 09:59 Serge Dorofeev wrote:
> Hi PostrgeSQL team,
>
> My PostrgeSQL installed as part of CYGWIN (Windows XP).
> I have compared performance PostrgeSQL to MS SQL (I used a little Java
> program with number of inserts in table).
> MS SQL is faster in 12 times :-(
> It's very strange results.
> Guys who developed this server: what you can tell in this - what
> customizations needs to increase of productivity?
> How to force PostgreeSQL to work faster?
>
>
> Speed (inserts/sec) Elapsed time (ms)
> MS SQL (Average): 295 39 869
> testInsert 5000
> 263 18 977
> 255 19 619
> 306 16 334
>
> testInsert 10000
> 315 31 716
> 324 30 905
> 319 31 325
>
> testInsert 20000
> 241 82 919
> 313 63 922
> 317 63 101
>
> PostrgreSQL (Average): 24 520 160
> testInsert 5000
> 26 191 434
> 26 191 264
> 26 192 295
>
> testInsert 10000
> 22 463 669
> 25 393 510
> 24 409 528
>
> testInsert 20000
> 24 834 911
> 17 1 184 613
> 24 820 218
> MS SQL is faster (times): 12 13
You don't give any details about your test code or how the databases are
configured so I'm guessing that you're inserts use an autocommitting
connection. For PostgreSQL, this causes each insert to be run inside a
tranaction and the transaction is then immediately written to disk. My
guess is that MS SQL behaves differently and doesn't immediately write to
disk (faster maybe but could cause data corruption). Try modifying your
program to have connection.setAutoCommit(false) and do a
connection.commit() after say every 100 inserts.
HTH
--
Paul Thomas
+------------------------------+---------------------------------------------+
| Thomas Micro Systems Limited | Software Solutions for the Smaller
Business |
| Computer Consultants |
http://www.thomas-micro-systems-ltd.co.uk |
+------------------------------+---------------------------------------------+
From shridhar_daithankar@persistent.co.in Mon Aug 11 13:22:46 2003
X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org
Received: from localhost (unknown [64.117.224.130])
by svr1.postgresql.org (Postfix) with ESMTP id A7471D1C984
for ;
Mon, 11 Aug 2003 13:22:46 +0000 (GMT)
Received: from svr1.postgresql.org ([64.117.224.193])
by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new,
port 10024) with ESMTP id 90455-07
for ;
Mon, 11 Aug 2003 10:21:20 -0300 (ADT)
Received: from smtp.pspl.co.in (unknown [202.54.11.65])
by svr1.postgresql.org (Postfix) with ESMTP id 5B64BD1C4E1
for ;
Mon, 11 Aug 2003 10:22:34 -0300 (ADT)
Received: (from root@localhost)
by smtp.pspl.co.in (8.12.9/8.12.9) id h7BDOZkk019845
for ; Mon, 11 Aug 2003 18:54:35 +0530
Received: from daithan (daithan.intranet.pspl.co.in [192.168.7.161])
(authenticated bits=0)
by persistent.co.in (8.12.9/8.12.9) with ESMTP id h7BDOY3g019832
for ; Mon, 11 Aug 2003 18:54:34 +0530
From: "Shridhar Daithankar"
To:
Date: Mon, 11 Aug 2003 18:54:29 +0530
MIME-Version: 1.0
Subject: Re: How to force PostgreeSQL to work faster?
Reply-To: shridhar_daithankar@persistent.co.in
Message-ID: <3F37E665.29307.1A7FBFD4@localhost>
In-reply-to: <000101c35fe6$ea3fea80$3000a8c0@sergeyd>
X-mailer: Pegasus Mail for Windows (v4.12a)
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7BIT
Content-description: Mail message body
X-Virus-Scanned: by amavisd-new at postgresql.org
X-Archive-Number: 200308/165
X-Sequence-Number: 2982
On 11 Aug 2003 at 11:59, Serge Dorofeev wrote:
>
> Hi PostrgeSQL team,
>
> My PostrgeSQL installed as part of CYGWIN (Windows XP).
> I have compared performance PostrgeSQL to MS SQL (I used a little Java program
> with number of inserts in table).
> MS SQL is faster in 12 times :-(
> It's very strange results.
> Guys who developed this server: what you can tell in this - what customizations
> needs to increase of productivity?
> How to force PostgreeSQL to work faster?
First of all, get a unix. Cygwin is nowhere near any unix OS as far as
performance goes. Get linux and test. Testing postgresql under cygwin is like
testing MSSQL server under wine. May be wine is faster than cygwin but you got
the idea..
Second tune postgresql. Since you have not given any details, I would assume
you are runnning stock install of postgresql, which is not made for a benchmark
to say the least.
Check http://www.varlena.com/GeneralBits/Tidbits/perf.html for starters. Let us
know if that makes any difference..
Bye
Shridhar
--
Baker's First Law of Federal Geometry: A block grant is a solid mass of money surrounded on all sides by governors.