Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id DA466632B88 for ; Wed, 16 Dec 2009 05:29:27 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 79534-06 for ; Wed, 16 Dec 2009 09:29:12 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.r61.net (mail.r61.net [195.208.245.249]) by mail.postgresql.org (Postfix) with ESMTP id 0352163242E for ; Wed, 16 Dec 2009 05:29:16 -0400 (AST) Received: from pyhalov.cc.rsu.ru (pyhalov.cc.rsu.ru [195.208.252.128]) (authenticated bits=0) by mail.r61.net (8.14.3/8.14.1) with ESMTP id nBG9TECJ037293 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Wed, 16 Dec 2009 12:29:14 +0300 (MSK) (envelope-from alp@rsu.ru) Message-ID: <4B28A86A.3060506@rsu.ru> Date: Wed, 16 Dec 2009 12:29:14 +0300 From: Alexander Pyhalov User-Agent: Thunderbird 2.0.0.23 (X11/20091202) MIME-Version: 1.0 To: pgsql-jdbc@postgresql.org Subject: Re: Get bytes sent to client References: <4B2894E7.80407@rsu.ru> In-Reply-To: <4B2894E7.80407@rsu.ru> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.299 tagged_above=-10 required=5 tests=AWL=-1.300, BAYES_50=0.001 X-Spam-Level: X-Archive-Number: 200912/45 X-Sequence-Number: 20126 I had some thoughts about extending ProtocolConnectionImpl, PGStream=20 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=20 also is quite time-consuming... Are there any other ideas? The idea is=20 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:= >=20 > SELECT S.value FROM V$MYSTAT S,SYS.V_$STATNAME NAMES > WHERE NAMES.STATISTIC#=3DS.STATISTIC# > AND NAMES.NAME=3D'bytes sent via SQL*Net to client'; >=20 > 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=20 > generated in response to a query. >=20 --=20 =D0=A1 =D1=83=D0=B2=D0=B0=D0=B6=D0=B5=D0=BD=D0=B8=D0=B5=D0=BC, =D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B0=D0=BD=D0=B4=D1=80 =D0=9F=D1=8B=D1=85= =D0=B0=D0=BB=D0=BE=D0=B2, =D1=81=D0=B8=D1=81=D1=82=D0=B5=D0=BC=D0=BD=D1=8B=D0=B9 =D0=B0=D0=B4=D0=BC= =D0=B8=D0=BD=D0=B8=D1=81=D1=82=D1=80=D0=B0=D1=82=D0=BE=D1=80 =D0=AE=D0=93= =D0=98=D0=9D=D0=A4=D0=9E =D0=AE=D0=A4=D0=A3.