binary protocol was Performance problem with timestamps in result sets

From: Dave Cramer <pg(at)fastcrypt(dot)com>
To: List <pgsql-jdbc(at)postgresql(dot)org>
Subject: binary protocol was Performance problem with timestamps in result sets
Date: 2006-03-09 12:11:17
Message-ID: 20CDAF3A-82E6-4E56-84A7-DC2EC202D703@fastcrypt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

As Oliver points out the timestamp is not a 64bit integer, or even a
floatingpoint number. It is a textual representation of the timestamp
which needs to be parsed. I looked at the parsing and I was unable to
see anything that could be significantly optimized.

So the option of going to the binary protocol exists. There are a
number of challenges with this. As Oliver points out this is an all
or nothing proposition. In other words you can't ask for just
timestamps to be returned in binary. The entire row comes back as
binary. Additionally, there are two possible representations of
timestamps in postgresql. One is a 64 bit integer, the other is
floating point. Added to this there may be endian issues ( do we know
the answer to this question ?)

Significant performance improvement exists for dates, times,
timestamps, however the advantages for the rest of the types is
questionable given the above assertions.

Comments ?

Dave

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message mikael-aronsson 2006-03-09 12:39:09 Re: binary protocol was Performance problem with timestamps in result sets
Previous Message Oliver Jowett 2006-03-09 08:54:44 Re: Performance problem with timestamps in result sets