Re: Slow response of PostgreSQL

Поиск
Список
Период
Сортировка
От Christopher Kings-Lynne
Тема Re: Slow response of PostgreSQL
Дата
Msg-id 4031BBBC.5050002@familyhealth.com.au
обсуждение исходный текст
Ответ на Slow response of PostgreSQL  ("Saleem Burhani Baloch" <peseek@khi.wol.net.pk>)
Ответы Re: Slow response of PostgreSQL  (Bill Moran <wmoran@potentialtech.com>)
Список pgsql-performance
> select count(*), sum(vl_ex_stax) , sum(qty) , unit from inv_detail group by unit;
> on both databases.
>
> PostgreSQL return result in 50 sec every time.
> MS-SQL     return result in  2 sec every time.

> My PostgreSQL Conf is
> *********************
> log_connections = yes
> syslog = 2
> effective_cache_size = 327680
> sort_mem = 10485760
> max_connections = 64
> shared_buffers = 512
> wal_buffers = 1024

This is a shockingly bad postgresql.conf.  I'm not surprised you have
performance problems.  Change this:

effective_cache_size = 4000
sort_mem = 4096
shared_buffers = 1000
wal_buffers = 8

Also, you need a LOT more RAM in your PostgreSQL machine, at least half
a gig for a basic database server.

> 1- How can I lock a single record so that other users can only read it. ??

You cannot do that in PostgreSQL.

> 2- one user executes a query it will be process and when another user executes the same query having the same result
shouldnot again go for processing. The result should be come from the cache. Is this possible in postgres ?? 

No, implement it in your application.  Prepared queries and stored
procedures might help you here.

Chris


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

Предыдущее
От: "Saleem Burhani Baloch"
Дата:
Сообщение: Slow response of PostgreSQL
Следующее
От: Stephan Szabo
Дата:
Сообщение: Re: Slow response of PostgreSQL