Re: TimestampUtils.toString() speedup - Mailing list pgsql-jdbc

From Kris Jurka
Subject Re: TimestampUtils.toString() speedup
Date
Msg-id Pine.BSO.4.64.0703021259480.30573@leary.csoft.net
Whole thread Raw
In response to TimestampUtils.toString() speedup  (Alex Malone <amalone@heliumsystems.com>)
List pgsql-jdbc

On Fri, 2 Mar 2007, Alex Malone wrote:

> Here is a small change that improved the performance of setting a
> timestamp field on a prepared statement from 0.513ms to 0.083ms in our
> tests.  Measured using JProfiler for 50,000 iterations. Essentially it
> is switching to use SimpleDateFormat for toString().  I believe this
> code is from the 8.1 408 driver.
>
>             pgdtf.format(cal.getTime(), sbuf, FIRSTPOS);

Doesn't this leave out the nanoseconds?  The Calendar won't have anything
below milliseconds.

Kris Jurka


pgsql-jdbc by date:

Previous
From: Alex Malone
Date:
Subject: TimestampUtils.toString() speedup
Next
From: Alex Malone
Date:
Subject: Re: TimestampUtils.toString() speedup