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

Поиск
Список
Период
Сортировка
От Oliver Jowett
Тема Re: how to monitor the amount of bytes fetched in a executeQuery()
Дата
Msg-id 44B57436.9040308@opencloud.com
обсуждение исходный текст
Ответ на Re: how to monitor the amount of bytes fetched in a executeQuery()  ("Nicholas E. Wakefield" <nwakefield@KineticNetworks.com>)
Список pgsql-jdbc
Albert Cardona wrote:

> I will have a look at the code myself but I'm not familiar with it -you say
> it's at PGconnection class?

org.postgresql.PGConnection is our extension interface that applications
use to get access to driver-specific features. The actual implementation
would go in AbstractJdbc2Connection which would delegate to the
protocol-level code in org/postgresql/core/* to get stats from the
underlying connection. Looks like you may need to play with PGStream so
it actually tracks the byte count, unless one of the wrapping streams
already does that.

app code would look something like this:

   Connection c = /* get connection */;
   if (c instanceof PGConnection) {
     PGConnection pgc = (PGConnection)c;
     long byteCount = pgc.getInputByteCount(); // or whatever
   }

-O

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Oliver Jowett
Дата:
Сообщение: Re: executeQuery Locked
Следующее
От: Albert Cardona
Дата:
Сообщение: Re: how to monitor the amount of bytes fetched in a executeQuery()