pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Oliver Jowett <oliver@opencloud.com>
To: Thomas Dudziak <tomdzk@gmail.com>
Cc: Michael Paesold <mpaesold@gmx.at>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Performance problem with timestamps in result sets
Date: Thu, 09 Mar 2006 00:11:26 +0900
Message-ID: <440EF41E.20508@opencloud.com> (raw)
In-Reply-To: <224f32340603080657m35f7c35do34a2c6dc3f1b5f0@mail.gmail.com>
References: <224f32340603080537ld424d49l2eea9440594104d3@mail.gmail.com>
	<060a01c642bf$b3060220$9001a8c0@zaphod>
	<224f32340603080657m35f7c35do34a2c6dc3f1b5f0@mail.gmail.com>

Thomas Dudziak wrote:
> On 3/8/06, Michael Paesold <mpaesold@gmx.at> wrote:
> 
> 
>>This should be 1 ms per getTimestamp call, shouldn't it? The time is the
>>aggregate time for ~8000 calls. That is still rather slow, yeah, but it is
>>so with profiling.
> 
> 
> Yep, but as I said, the others are much faster. E.g. getString takes
> 140ms for 5460 calls, and getInt 570ms for 10920 calls, so its
> probably not so much the profiler.

getTimestamp() does many more internal method invocations than getInt() 
so the per-method overhead of your profiler will have a larger effect on 
getTimestamp(). Consider that some of the utility methods that 
getTimestamp() calls internally are very small and will be inlined by 
the JIT in normal operation..

I would try an external benchmark without profiling to get more 
comparable numbers: record start time, call getTimestamp() 1000000 
times, record end time; repeat for getInt(). A warmup loop is a good 
idea too if you want to measure the JITted performance, 8000 invocations 
is not much in terms of what the JIT does.

> Also, I was merely asking whether there is something that could be
> done to bring getTimestamp at least in the same region.

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..

-O



view thread (16+ messages)  latest in thread

Message-ID: <440EF41E.20508@opencloud.com>
Permalink:  ../440EF41E.20508@opencloud.com/
Also on:    postgresql.org/message-id/440EF41E.20508@opencloud.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: oliver@opencloud.com, tomdzk@gmail.com, mpaesold@gmx.at
  Subject: Re: Performance problem with timestamps in result sets
  In-Reply-To: <440EF41E.20508@opencloud.com>
  References: <224f32340603080537ld424d49l2eea9440594104d3@mail.gmail.com> <060a01c642bf$b3060220$9001a8c0@zaphod> <224f32340603080657m35f7c35do34a2c6dc3f1b5f0@mail.gmail.com> <440EF41E.20508@opencloud.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