Re: Patch: Force Primitives - Mailing list pgsql-jdbc

From Nicholas White
Subject Re: Patch: Force Primitives
Date
Msg-id CA+=vxNZ9K7J+Pay-WqKtTsG0PTf2hxchfyX6ZQHWHtwdNuz-3g@mail.gmail.com
Whole thread Raw
In response to Re: Patch: Force Primitives  (Mikko Tiihonen <mikko.tiihonen@nitorcreations.com>)
Responses Re: Patch: Force Primitives  (Mikko Tiihonen <mikko.tiihonen@nitorcreations.com>)
List pgsql-jdbc
> Do you see the binary transfers activating for array receives if you run your prepared statement select in a loop?
That's the behaviour I see, athough something's setting my m_prepareThreshold to 5 rather than 3. I'm essentially using postgres as a persistent cache for my application server; when my app server starts it loads large amounts of data from postgres using a series of select-*-from-x queries. In order to minimise network I/O I'd ideally like a way to ensure I'm using the binary protocol from the very first query. Should I submit another patch that lets you configure this behaviour (either via a new JDBCUrl parameter or whether binaryTransfer is explicitly specified)?

Separately, do you know why this behaviour is the default? Is the binary encoding more expensive (either server-side or client-side) than text encoding the data?

Thanks -

Nick

pgsql-jdbc by date:

Previous
From: Mikko Tiihonen
Date:
Subject: Re: Patch: Force Primitives
Next
From: Mikko Tiihonen
Date:
Subject: Re: Patch: Force Primitives