Re: Performance problem with timestamps in result sets - Mailing list pgsql-jdbc

From Nicholas E. Wakefield
Subject Re: Performance problem with timestamps in result sets
Date
Msg-id 2F2A7EB72EBAF24582513E72ACCBCAAE0A264C@kniexch01.KineticNetworks.com
Whole thread Raw
In response to Performance problem with timestamps in result sets  ("Thomas Dudziak" <tomdzk@gmail.com>)
List pgsql-jdbc
I just read this thread, as I to have found timestamp processing to be a
bottleneck and maybe there is nothing that can be done about it, without
going binary. However the firstNonDigit method could be optimized,
currently it uses isDigit, which does a lot more than checking if a
character is between 0 and 9 (Though I'm not sure if this would work for
all languages). Anyway I'm going to poke around and see if I can find a
way to bring the number down from 40% in my app.

> There is no simple go-faster change I know of. Then again I've not
> heard of any performance problems in this area before.
> If you do come up with some performance-improving changes, by all
> means post them to the list for integration into the official driver..



* 40.1% - 51,652 ms - 92,028 inv.
    org.postgresql.jdbc2.TimestampUtils.toTimestamp
    o 37.0% - 47,598 ms - 92,028 inv.
        org.postgresql.jdbc2.TimestampUtils.loadCalendar
        * 19.1% - 24,538 ms - 736,224 inv.

org.postgresql.jdbc2.TimestampUtils.firstNonDigit
Nicholas

pgsql-jdbc by date:

Previous
From: Dave Cramer
Date:
Subject: Re: psql COPY with JDBC
Next
From: "Guy Rouillier"
Date:
Subject: Re: psql COPY with JDBC