Re: how to monitor the amount of bytes fetched in a executeQuery() - Mailing list pgsql-jdbc

From Oliver Jowett
Subject Re: how to monitor the amount of bytes fetched in a executeQuery()
Date
Msg-id 44B4846A.3010307@opencloud.com
Whole thread Raw
In response to how to monitor the amount of bytes fetched in a executeQuery() ?  (Albert Cardona <acardona@ini.phys.ethz.ch>)
Responses Re: how to monitor the amount of bytes fetched in a executeQuery()  ("Nicholas E. Wakefield" <nwakefield@KineticNetworks.com>)
List pgsql-jdbc
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

pgsql-jdbc by date:

Previous
From: Oliver Jowett
Date:
Subject: Re: Limit vs setMaxRows issue
Next
From: Oliver Jowett
Date:
Subject: Re: executeQuery Locked