Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZCZky-0006g6-Ta for pgsql-jdbc@arkaria.postgresql.org; Tue, 07 Jul 2015 20:46:21 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZCZky-0000F5-58 for pgsql-jdbc@arkaria.postgresql.org; Tue, 07 Jul 2015 20:46:20 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZCZkw-0000Ey-T3 for pgsql-jdbc@postgresql.org; Tue, 07 Jul 2015 20:46:19 +0000 Received: from smtprelay02.ispgateway.de ([80.67.31.36]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZCZkt-0003TT-6i for pgsql-jdbc@postgresql.org; Tue, 07 Jul 2015 20:46:17 +0000 Received: from [88.66.22.204] (helo=Zauselmaus) by smtprelay02.ispgateway.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.84) (envelope-from ) id 1ZCZkp-0005eD-8b for pgsql-jdbc@postgresql.org; Tue, 07 Jul 2015 22:46:11 +0200 From: "Markus KARG" To: "'List'" References: <002d01d0b809$cff8cd30$6fea6790$@eu> In-Reply-To: Subject: Re: PostgreSQL gaps wrt to java, and jdbc Date: Tue, 7 Jul 2015 22:46:16 +0200 Organization: Markus KARG, Staatl. gepr. Inf. Message-ID: <001b01d0b8f5$f87c0500$e9740f00$@eu> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_001C_01D0B906.BC04D500" X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: AdC43fWCIQzFxuemTWqrZKTfLDWAAQAFwHeA Content-Language: de X-AVK-Virus-Check: AVA 25.2250;789163EA X-AVK-Spam-Check: 1; str=0001.0A0C0204.559C3A93.0064,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0; F1206 X-Df-Sender: bWFya3VzQGhlYWRjcmFzaGluZy5ldQ== X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-jdbc Precedence: bulk Sender: pgsql-jdbc-owner@postgresql.org This is a multi-part message in MIME format. ------=_NextPart_000_001C_01D0B906.BC04D500 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable No, unfortunately not, as there is a big difference between compression = and binary transmission. See the following example: =20 =20 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. =20 Binary transmission on the other hand will only need four bytes per = integer. That makes twelve bytes for all the above attributes. =20 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. =20 -Markus =20 =20 =20 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 =20 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 =20 On 6 July 2015 at 12:35, Markus KARG 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). =20 =20 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 =20 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. =20 I am wondering what could the server do better that would help JDBC? =20 Obviously streaming a column is one. Possibly rowid's. Anything else ? =20 Dave Cramer =20 ------=_NextPart_000_001C_01D0B906.BC04D500 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

No, unfortunately not, as there is a big difference between = compression and binary transmission. See the following = example:

 

<Some-Element = xyz=3D"345678,901">

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 <Some-Other-Element = abc=3D"54321,876">

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 <Some-Value = my-attribute=3D"123456,789"/>

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 </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

 <= /o:p>

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.

 <= /o:p>

I am = wondering what could the server do better that would help = JDBC?

 <= /o:p>

Obviously = streaming a column is one. Possibly rowid's. Anything else = ?

 <= /o:p>


Dave = Cramer

 

------=_NextPart_000_001C_01D0B906.BC04D500--