how to monitor the amount of bytes fetched in a executeQuery() ?

From: Albert Cardona <acardona(at)ini(dot)phys(dot)ethz(dot)ch>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: how to monitor the amount of bytes fetched in a executeQuery() ?
Date: 2006-07-11 18:27:42
Message-ID: 200607111127.42790.acardona@ini.phys.ethz.ch
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc


Hi all,

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?

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?

Thanks for any hints.

Albert

--
Albert Cardona
Molecular Cell Developmental Biology
University of California Los Angeles
Tel +1 310 2067376
Programming: http://www.ini.unizch.ch/~acardona/trakem2.html
Research: http://www.mcdb.ucla.edu/Research/Hartenstein/
Web design: http://www.pixelets.com

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Chris White (cjwhite) 2006-07-11 18:55:18 unsubscribe
Previous Message Mark Lewis 2006-07-11 18:27:11 Re: executeQuery Locked