Re: Why is PGStream.flush() taking so much time? - Mailing list pgsql-jdbc

From Guido Fiala
Subject Re: Why is PGStream.flush() taking so much time?
Date
Msg-id 200411160830.07793.guido.fiala@dka-gmbh.de
Whole thread Raw
In response to Why is PGStream.flush() taking so much time?  (Guido Fiala <guido.fiala@dka-gmbh.de>)
Responses Re: Why is PGStream.flush() taking so much time?
List pgsql-jdbc
Am Montag, 15. November 2004 20:15 schrieben Sie:
> Guido Fiala wrote:
> > Due to performance problems profiling showed the PGStream.flush() - thats
> > pg_output buffered Stream - takes the most time although we do not really
> > send much sql-queries at that time, at least we get much more data than
> > we send. System and database is also almost idle at that time.
>
> Can you show us the whole profile? I can't see why flush() should be
> expensive at all. Are you sure that you are not counting time spent
> blocked in native code as busy time? (hprof likes to do that)

Used jtreeprofiler for that, and yes, after explizitely including
java.lang.Object things look different (although flush still shows up and
some other expensive things are there too):

method calls time   [ms]
Object.wait 109 6035.474
PGStream.ReceiveChar 789 1368.841
AbstractJdbc1ResultSet.findColumn 2923 425.492
PGStream.flush 80 416.933
PGStream.-init- 2 388.863
PGStream.ReceiveIntegerR 9418 353.866
PGStream.Receive 11452 199.189
Encoding.decodeUTF8 3953 117.751
Object.hashCode 4900 90.403
AbstractJdbc1ResultSet.toInt 1029 85.886
Encoding.encode 77 69.640
AbstractJdbc1Statement.replaceProcessing 66 60.507
AbstractJdbc1ResultSet.toBoolean 322 56.763
AbstractJdbc1ResultSet.toLong 535 50.175
Encoding.decode 6390 47.275
AbstractJdbc1ResultSet.checkResultSet 3820 43.495
AbstractJdbc1ResultSet.getFixedString 1726 38.374


pgsql-jdbc by date:

Previous
From: Kris Jurka
Date:
Subject: Re: Translation updates: ru
Next
From: "enishiseki@juno.com"
Date:
Subject: JDBC calling PL/pgSQL with array parameter