|
|||||||||||
|
[JDBC] Performance comparison to psql.
From: Arie Ozarov <aozarov(at)hi5.com>
Date: Tue Feb 05 2008 - 16:42:36 EST
Here are some numbers:
PSQL *COPY* from STDIN
WITHOUT INDEXES: time = 50544 ms (*0.005 ms* per record) WITH 2 INDEXES: time = 221491 ms (*0.022 ms* per record) *JDBC (prepared statement without batch)* WITHOUT INDEXES: time = 64874 ms (*0.649 **ms* per record) WITH 2 INDEXES: time = 63057 ms (*0.630 ms* per record) *JDBC (**prepared statement with batch**)* WITHOUT INDEXES: time = 73205 ms (*0.073** ms* per record) WITH 2 INDEXES: time = 100270 ms (*0.100 ms* per record) Comparison table (records inserted per millisecond)
COPY JDBC JDBC batch
WITHOUT INDEXES: 198 1.5 14
WITH 2 INDEXES: 45 1.5 10
As for select/queries psql was about 3 times faster. Both psql and jdbc operations were done remotely from the same machine. I understand that JDBC has some overhead (object translation,..) but didn't think the difference would be that big. Do this numbers look correct (any optimization suggestion?) Any performance improvement in postgresql-8.2-507.jdbc4.jar? Is the copy operation much more optimized than inserts (and if so when/will the driver support it)?
Thanks,
---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match
Received on Tue Feb 5 17:12:38 2008This archive was generated by hypermail 2.1.8 : Wed Jun 18 2008 - 23:43:38 EDT |
||||||||||
|
|||||||||||