Skip site navigation (1) Skip section navigation (2)

Re: Get bytes sent to client

From: dmp <danap(at)ttc-cmc(dot)net>
To: Alexander Pyhalov <alp(at)rsu(dot)ru>, pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Get bytes sent to client
Date: 2009-12-16 16:22:00
Message-ID: 4B290928.5080004@ttc-cmc.net (view raw or flat)
Thread:
Lists: pgsql-jdbc
I have had similar interest in my applications raw byte traffic on the 
network and
just ended up using on Linux iptraf monitor. You can reset it then  
execute a query
in the client to see exactly the bytes being transmitted/received. I'm 
sure there must
be something similar for other platforms.

danap.

> I had some thoughts about extending ProtocolConnectionImpl, PGStream 
> and so on (to account bytes on client side, when PGStream calls 
> pg_input  methods), but they have a lot of private fields and 
> methods... It is also is quite time-consuming... Are there any other 
> ideas? The idea is to account size of raw data sent to client...
>
> Alexander Pyhalov wrote:
>
>> Hello.
>> I'd like to collect some statistics in my application (using JDBC). 
>> In Oracle I could collect data, sent to client, using the following 
>> query:
>>
>> SELECT S.value FROM V$MYSTAT S,SYS.V_$STATNAME NAMES
>> WHERE NAMES.STATISTIC#=S.STATISTIC#
>> AND NAMES.NAME='bytes sent via SQL*Net to client';
>>
>> Can I do something like this in PostgreSQL? I'd like to estimate 
>> query result size, to be more precise, amount of network traffic, 
>> which is generated in response to a query.
>>

In response to

Responses

pgsql-jdbc by date

Next:From: Alexander PyhalovDate: 2009-12-16 16:56:33
Subject: Re: Get bytes sent to client
Previous:From: Guillaume CottenceauDate: 2009-12-16 14:00:15
Subject: Re: Error when attempting to call Connection.createArrayOf() method

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group