Performance problem with timestamps in result sets

Поиск
Список
Период
Сортировка
От Thomas Dudziak
Тема Performance problem with timestamps in result sets
Дата
Msg-id 224f32340603080537ld424d49l2eea9440594104d3@mail.gmail.com
обсуждение исходный текст
Ответы Re: Performance problem with timestamps in result sets
Re: Performance problem with timestamps in result sets
Список pgsql-jdbc
Hi,

while profiling an application of ours, I noticed a performance
problem with the PostgreSQL JDBC driver (the same for any version:
8.0, 8.1, 8.2dev-501).
In short, whenever the ResultSet contains a timestamp value, the JDBC
driver takes nearly one second to extract it (this is against a 8.0 on
Windows, database and application on the same machine; with a
non-development configuration, the number would be a bit lower).
The profiling shows that the culprit is

-> AbstractJdbc2ResultSet.getTimestamp(int) : 7130ms | 8190 calls
    -> TimestampUtils.loadCalendar(GregorianCalendar, String, String)
: 5417ms | 8190 calls
        -> TimestampUtils.firstNonDigit : 2163ms | 49140 times
        -> TimestampUtils.number(String, int, int) : 1562ms | 49140 times

Now my question is, is there something to make this faster ? Nearly
1sec for a ResulSet.getTimestamp call is too much for us.

cheers,
Tom

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

Предыдущее
От: "Rajeev Menon"
Дата:
Сообщение: Connection String
Следующее
От: Dave Cramer
Дата:
Сообщение: Re: Performance problem with timestamps in result sets