From: Kris Jurka <books@ejurka.com>
To: Alex Malone <amalone@heliumsystems.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: TimestampUtils.toString() speedup
Date: Fri, 2 Mar 2007 13:01:13 -0500 (EST)
Message-ID: <Pine.BSO.4.64.0703021259480.30573@leary.csoft.net> (raw)
In-Reply-To: <129448.5111.qm@web32909.mail.mud.yahoo.com>
References: <129448.5111.qm@web32909.mail.mud.yahoo.com>
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
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: books@ejurka.com, amalone@heliumsystems.com
Subject: Re: TimestampUtils.toString() speedup
In-Reply-To: <Pine.BSO.4.64.0703021259480.30573@leary.csoft.net>
References: <129448.5111.qm@web32909.mail.mud.yahoo.com> <Pine.BSO.4.64.0703021259480.30573@leary.csoft.net>
* 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