pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Dave Cramer <pg@fastcrypt.com>
To: Thomas Dudziak <tomdzk@gmail.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Performance problem with timestamps in result sets
Date: Wed, 8 Mar 2006 09:11:59 -0500
Message-ID: <8CEC950B-123B-400B-92C3-49EC437B10F8@fastcrypt.com> (raw)
In-Reply-To: <224f32340603080537ld424d49l2eea9440594104d3@mail.gmail.com>
References: <224f32340603080537ld424d49l2eea9440594104d3@mail.gmail.com>

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@postgresql.org so that  
> your
>        message can get through to the mailing list cleanly
>




view thread (16+ messages)  latest in thread

Message-ID: <8CEC950B-123B-400B-92C3-49EC437B10F8@fastcrypt.com>
Permalink:  ../8CEC950B-123B-400B-92C3-49EC437B10F8@fastcrypt.com/
Also on:    postgresql.org/message-id/8CEC950B-123B-400B-92C3-49EC437B10F8@fastcrypt.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: pg@fastcrypt.com, tomdzk@gmail.com
  Subject: Re: Performance problem with timestamps in result sets
  In-Reply-To: <8CEC950B-123B-400B-92C3-49EC437B10F8@fastcrypt.com>
  References: <224f32340603080537ld424d49l2eea9440594104d3@mail.gmail.com> <8CEC950B-123B-400B-92C3-49EC437B10F8@fastcrypt.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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