Re: Beginning tuning

From: "Albe Laurenz" <laurenz(dot)albe(at)wien(dot)gv(dot)at>
To: "Kris Jurka *EXTERN*" <books(at)ejurka(dot)com>, "Phillip Mills" <pmills(at)systemcore(dot)ca>
Cc: <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Beginning tuning
Date: 2007-11-07 08:47:17
Message-ID: D960CB61B694CF459DCFB4B0128514C287F772@exadv11.host.magwien.gv.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

>> One of the first things I've noticed out of a number of
>> thread dumps is that there's about an 80% chance that
>> the stack points to I/O requests from PGStream.ReceiveChar().
>> I'm wondering about any hints or pointers that would help
>> me understand whether that's expected behavior, or something that
>> needs fixing, or just generally how to evaluate/improve
>> JDBC performance.
>
> The ReceiveChar call is waiting for data from the backend.
> I'm not sure how you're identifying blocked threads, but
> ReceiveChar is a blocking call underneath the hood.
> So this just shows that the driver is waiting while
> queries are executing which is perfectly expected.

I'd like to add to this that you should only start tuning if
you experience a performance problem.

In your case, if most of the time is spent waiting for database
results, you could check if the SQL statements can be
improved. Also, I have seen cases where much time gets
lost in client-server chat because a program performs 1000s
of nearly identical short queries in a loop instead of
performing one bigger query that would have the database server
perform the loop more efficiently.

As I said, only tune when you have a problem.

Yours,
Laurenz Albe

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Albe Laurenz 2007-11-07 08:52:57 Re: can i get your help?
Previous Message 田忠磊 2007-11-07 06:25:19 can i get your help?