Re: Performance comparison to psql.

Поиск
Список
Период
Сортировка
От Kris Jurka
Тема Re: Performance comparison to psql.
Дата
Msg-id Pine.BSO.4.64.0802051727210.12452@leary.csoft.net
обсуждение исходный текст
Ответ на Performance comparison to psql.  (Arie Ozarov <aozarov@hi5.com>)
Ответы Re: Performance comparison to psql.  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Performance comparison to psql.  (Arie Ozarov <aozarov@hi5.com>)
Список pgsql-jdbc

On Tue, 5 Feb 2008, Arie Ozarov wrote:

> 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?)

The real cost is the protocol level overhead of INSERT vs COPY.  JDBC
batch execution groups things together to reduce the number of network
round trips, but it still has to send each insert as an individual request
to the server.

> Any performance improvement in postgresql-8.2-507.jdbc4.jar?
>

No.

> Is the copy operation much more optimized than inserts (and if so when/will
> the driver support it)?
>

Yes, copy is significantly faster than insert.  If you'd like, construct a
psql test case that does 100,000 individual inserts and you'll see it's
not just a JDBC driver/libpq difference.

Copy support is available using this patched driver, but it has not been
integrated into the official version yet.

http://kato.iki.fi/sw/db/postgresql/jdbc/copy/

Kris Jurka


В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Arie Ozarov
Дата:
Сообщение: Performance comparison to psql.
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Performance comparison to psql.