pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Oliver Jowett <oliver@opencloud.com>
To: Albert Cardona <acardona@ini.phys.ethz.ch>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: how to monitor the amount of bytes fetched in a executeQuery()
Date: Wed, 12 Jul 2006 14:11:06 +0900
Message-ID: <44B4846A.3010307@opencloud.com> (raw)
In-Reply-To: <200607111127.42790.acardona@ini.phys.ethz.ch>
References: <200607111127.42790.acardona@ini.phys.ethz.ch>

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



view thread (7+ messages)  latest in thread

Message-ID: <44B4846A.3010307@opencloud.com>
Permalink:  ../44B4846A.3010307@opencloud.com/
Also on:    postgresql.org/message-id/44B4846A.3010307@opencloud.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: oliver@opencloud.com, acardona@ini.phys.ethz.ch
  Subject: Re: how to monitor the amount of bytes fetched in a executeQuery()
  In-Reply-To: <44B4846A.3010307@opencloud.com>
  References: <200607111127.42790.acardona@ini.phys.ethz.ch> <44B4846A.3010307@opencloud.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox