pg.ddx.io pgsql-performance@postgresql.org mailing list archive
help / color / mirror / Atom feedHow to force PostgreeSQL to work faster?
4+ messages / 4 participants
[nested] [flat]
* How to force PostgreeSQL to work faster?
@ 2003-08-11 08:59 Serge Dorofeev <sergeyd@ua.fm>
0 siblings, 3 replies; 4+ messages in thread
From: Serge Dorofeev @ 2003-08-11 08:59 UTC (permalink / raw)
To: pgsql-performance
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.
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: How to force PostgreeSQL to work faster?
@ 2003-08-11 11:37 Tomka Gergely <tomka@zeus.gau.hu>
parent: Serge Dorofeev <sergeyd@ua.fm>
2 siblings, 0 replies; 4+ messages in thread
From: Tomka Gergely @ 2003-08-11 11:37 UTC (permalink / raw)
To: Serge Dorofeev <sergeyd@ua.fm>; +Cc: pgsql-performance
Hi!
Please send me the test db and the queries, with precise information
maybe the developers can help.
--
Tomka Gergely
"S most - vajon barbárok nélkül mi lesz velünk?
Ők mégiscsak megoldás voltak valahogy..."
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: How to force PostgreeSQL to work faster?
@ 2003-08-11 12:30 Paul Thomas <paul@tmsl.demon.co.uk>
parent: Serge Dorofeev <sergeyd@ua.fm>
2 siblings, 0 replies; 4+ messages in thread
From: Paul Thomas @ 2003-08-11 12:30 UTC (permalink / raw)
To: Serge Dorofeev <sergeyd@ua.fm>; +Cc: pgsql-performance
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 |
+------------------------------+---------------------------------------------+
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: How to force PostgreeSQL to work faster?
@ 2003-08-11 13:24 Shridhar Daithankar <shridhar_daithankar@persistent.co.in>
parent: Serge Dorofeev <sergeyd@ua.fm>
2 siblings, 0 replies; 4+ messages in thread
From: Shridhar Daithankar @ 2003-08-11 13:24 UTC (permalink / raw)
To: pgsql-performance
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.
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2003-08-11 13:24 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-08-11 08:59 How to force PostgreeSQL to work faster? Serge Dorofeev <sergeyd@ua.fm>
2003-08-11 11:37 ` Tomka Gergely <tomka@zeus.gau.hu>
2003-08-11 12:30 ` Paul Thomas <paul@tmsl.demon.co.uk>
2003-08-11 13:24 ` Shridhar Daithankar <shridhar_daithankar@persistent.co.in>
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