From: Markus KARG <markus@headcrashing.eu>
To: 'List' <pgsql-jdbc@postgresql.org>
Subject: Re: PostgreSQL gaps wrt to java, and jdbc
Date: Tue, 7 Jul 2015 22:46:16 +0200
Message-ID: <001b01d0b8f5$f87c0500$e9740f00$@eu> (raw)
In-Reply-To: <CADK3HHK2YJafjptVu-JB1DEsMH+6jDPdniaDPV4S70dLztbo8g@mail.gmail.com>
References: <CADK3HHLfJEx5i0CgvP=dGBXHUiHAcvTu0QeDoQTkyne42xn3fA@mail.gmail.com>
<002d01d0b809$cff8cd30$6fea6790$@eu>
<CADK3HHK2YJafjptVu-JB1DEsMH+6jDPdniaDPV4S70dLztbo8g@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-jdbc>
No, unfortunately not, as there is a big difference between compression and binary transmission. See the following example:
<Some-Element xyz="345678,901">
<Some-Other-Element abc="54321,876">
<Some-Value my-attribute="123456,789"/>
</Some-Other-Element>
</Some-Element>
With compression, you can certainly get rid of the whitespace, and if the compression algorithms is better you even will have refs instead of element names, but that's it, mostly. What about the numbers? Still transfered untouched, as unique hence uncompressable. So lots of integers and decimals screws compression.
Binary transmission on the other hand will only need four bytes per integer. That makes twelve bytes for all the above attributes.
To sum up, compressed transmission should be an option that is performed on a lower level (like gzip transmission with http), but is *additive* to binary transmission. The latter should be used even in case no compressed transmission is in place at all.
-Markus
From: davecramer@gmail.com [mailto:davecramer@gmail.com] On Behalf Of Dave Cramer
Sent: Dienstag, 7. Juli 2015 19:54
To: Markus KARG
Cc: List
Subject: Re: [JDBC] PostgreSQL gaps wrt to java, and jdbc
Looking at the backend code. One possibility is to just use compression to send it over?
Dave Cramer
dave.cramer(at)credativ(dot)ca
http://www.credativ.ca
On 6 July 2015 at 12:35, Markus KARG <markus@headcrashing.eu> wrote:
Binary represenation of XML and JSON instead of converting it to a String BEFORE transmission. Both JSON and XML essentially are graphs, and can be inflated with whitespace on the driver side AFTER transmission. Same in the other direction (deflate by transmitting binary object graph instead of whitespace-inflated String representation).
From: pgsql-jdbc-owner@postgresql.org [mailto:pgsql-jdbc-owner@postgresql.org] On Behalf Of Dave Cramer
Sent: Montag, 6. Juli 2015 14:15
To: List
Subject: [JDBC] PostgreSQL gaps wrt to java, and jdbc
I have been actively maintaining the driver off and on since 1999 or so. Recently we have had a flurry of activity and one of the things I noticed was the surprise that PostgreSQL didn't support X or did Y in some unexpected way. Sometimes we are a bit too complacent, and accept things the way they are.
I am wondering what could the server do better that would help JDBC?
Obviously streaming a column is one. Possibly rowid's. Anything else ?
Dave Cramer
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: markus@headcrashing.eu
Subject: Re: PostgreSQL gaps wrt to java, and jdbc
In-Reply-To: <001b01d0b8f5$f87c0500$e9740f00$@eu>
References: <CADK3HHLfJEx5i0CgvP=dGBXHUiHAcvTu0QeDoQTkyne42xn3fA@mail.gmail.com> <002d01d0b809$cff8cd30$6fea6790$@eu> <CADK3HHK2YJafjptVu-JB1DEsMH+6jDPdniaDPV4S70dLztbo8g@mail.gmail.com> <001b01d0b8f5$f87c0500$e9740f00$@eu>
* 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