From: | Dave Cramer <pg(at)fastcrypt(dot)com> |
---|---|
To: | Thomas Dudziak <tomdzk(at)gmail(dot)com> |
Cc: | pgsql-jdbc(at)postgresql(dot)org |
Subject: | Re: Performance problem with timestamps in result sets |
Date: | 2006-03-08 14:11:59 |
Message-ID: | 8CEC950B-123B-400B-92C3-49EC437B10F8@fastcrypt.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
Thomas,
That can't possibly be ...
Dave
On 8-Mar-06, at 8:37 AM, Thomas Dudziak wrote:
> 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
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo(at)postgresql(dot)org so that
> your
> message can get through to the mailing list cleanly
>
From | Date | Subject | |
---|---|---|---|
Next Message | Thomas Dudziak | 2006-03-08 14:15:41 | Performance problem with timestamps in result sets |
Previous Message | Thomas Dudziak | 2006-03-08 13:37:50 | Performance problem with timestamps in result sets |