X-Original-To: pgsql-jdbc-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 769A29FB1B9 for ; Tue, 11 Jul 2006 23:11:21 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 00610-01 for ; Tue, 11 Jul 2006 23:11:12 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from yass.opencloud.co.nz (yass.opencloud.co.nz [131.203.101.226]) by postgresql.org (Postfix) with ESMTP id 387BC9FA6B2 for ; Tue, 11 Jul 2006 23:11:12 -0300 (ADT) Received: from 203-118-178-246.bliink.ihug.co.nz ([203.118.178.246] helo=[10.1.1.6]) by yass.opencloud.co.nz with asmtp (TLS-1.0:DHE_RSA_AES_128_CBC_SHA:16) (Exim 4.34) id 1G0UBw-0006Wz-5I; Wed, 12 Jul 2006 14:11:08 +1200 Message-ID: <44B4846A.3010307@opencloud.com> Date: Wed, 12 Jul 2006 14:11:06 +0900 From: Oliver Jowett User-Agent: Mozilla Thunderbird 1.0.8 (X11/20060502) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Albert Cardona CC: pgsql-jdbc@postgresql.org Subject: Re: how to monitor the amount of bytes fetched in a executeQuery() References: <200607111127.42790.acardona@ini.phys.ethz.ch> In-Reply-To: <200607111127.42790.acardona@ini.phys.ethz.ch> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200607/42 X-Sequence-Number: 15468 Albert Cardona wrote: > I have a system in which large (13Mb) images are stored in the database as > compressed bytea column entries. When fetching from the local computer it's > fast enough the lag is not noticeable. When fetching remotely at 1Mb LAN > speed, about 15 seconds elapse. > > After timing the executeQuery() and the getBinaryStream(), the first takes > about 15 seconds and the second about 3. So it looks like the executeQuery() > is actually downloading the image, and the getBinaryStream is merely copying > it from a local resource. Is that right? Yes. > Is there any way in which the number of bytes fetched in a query or for a > particular column can be monitored, so I can display a more accurate and > elaborated waiting dialog in my application? I can't see any way to do this, unfortunately. -O