Обсуждение: DB Performance Tuning

Поиск
Список
Период
Сортировка

DB Performance Tuning

От
nilesh khode
Дата:

Hello,

I am working on database performace tuning on Postgresql 8.1 database build on Suse 10 Linux dedicated server. I am having 32 GB of RAM and 8 CPUs.  


I have made minimum recommended settings under postgresql.conf (i.e shared_buffer, work_mem, and effective cache_size also kernel.shmmax)

 

I have run SQL queries using pg-admin, the query execution + retrieval time is 80% reduced over existing server.

But same I tested with JDBC, the query requires more time as compared with existing server.

 

Please help me out in this performance tuning.
Regards,
Nilesh

Re: DB Performance Tuning

От
"Guido Neitzer"
Дата:
HI.

Can you try (just for testing) using a jdbc2 driver and a connection
string with "protocolVersion=2" included in the jdbc connection?

I had the same issue with this and the problem is, that the query
optimizer sometimes decides NOT to use indexes on prepared statements
(the newer JDBC drivers create use them) and bound variables.

I have a solution now for WebObjects but this might not help you.

cug

2006/9/5, nilesh khode <nilesh_khode@yahoo.com>:

> But same I tested with JDBC, the query requires more time as compared with
> existing server.

--
PostgreSQL Bootcamp, Big Nerd Ranch Europe, Nov 2006
http://www.bignerdranch.com/news/2006-08-21.shtml

Re: DB Performance Tuning

От
romje@javaxpert.com
Дата:
On Tue, September 5, 2006 5:08 pm, nilesh khode wrote:
>   Hello,
>
>  I am working on database performace tuning on Postgresql 8.1 database
> build on Suse 10 Linux dedicated server. I am having 32 GB of RAM and 8
> CPUs.
>

nice machine :)
>
> I have made minimum recommended settings under postgresql.conf (i.e
> shared_buffer, work_mem, and effective cache_size also kernel.shmmax)
>
>   I have run SQL queries using pg-admin, the query execution + retrieval
> time is 80% reduced over existing server.
>   But same I tested with JDBC, the query requires more time as compared
> with existing server.
>



what 's the driver used ? do you use statement or preparedstatement ?
the time given is made after 1 query or the same query repeated x times
then dividing the whole time by x ?
have you tried to use jdbc proxy (p6spy for instance) to watch the query ?
to know where the time is spent (don't use it in production !!!)
>   Please help me out in this performance tuning.
>


HTH
Jerome
> Regards,
> Nilesh
>
>


--
Auteur cahiers du programmeur J2EE - Eyrolles 2003