Re: Patch: Force Primitives
| От | Nicholas White | 
|---|---|
| Тема | Re: Patch: Force Primitives | 
| Дата | |
| Msg-id | CA+=vxNZ9K7J+Pay-WqKtTsG0PTf2hxchfyX6ZQHWHtwdNuz-3g@mail.gmail.com обсуждение исходный текст  | 
		
| Ответ на | Re: Patch: Force Primitives (Mikko Tiihonen <mikko.tiihonen@nitorcreations.com>) | 
| Ответы | 
                	
            		Re: Patch: Force Primitives
            		
            		 | 
		
| Список | 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? 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)?
В списке pgsql-jdbc по дате отправления: