Re: High CPU load on Postgres Server during Peak times!!!!

Поиск
Список
Период
Сортировка
От Dave Dutcher
Тема Re: High CPU load on Postgres Server during Peak times!!!!
Дата
Msg-id 11E13D6A17F84B848770849770B08FEE@tridecap.com
обсуждение исходный текст
Ответ на Re: High CPU load on Postgres Server during Peak times!!!!  (Shiva Raman <raman.shivag@gmail.com>)
Ответы Re: High CPU load on Postgres Server during Peak times!!!!  (Karl Denninger <karl@denninger.net>)
Re: High CPU load on Postgres Server during Peak times!!!!  (Craig James <craig_james@emolecules.com>)
Список pgsql-performance
>From: Shiva Raman
>Subject: Re: [PERFORM] High CPU load on Postgres Server during Peak
times!!!!
>
>Andy Colson Wrote :  ,
>>Eww.  I think that's bad.  A connection that has a transaction open will
cause lots of row versions,
>>which use up ram, and make it slower to step through the table (even with
an index).  You really need
>>to fix up your code and make sure you commit transactions.  (any statement
(select, insert, update) will
>>start a new transaction that you need to explicitly commit).
>
>With reference to this suggestion by Andy Colson, we checked the
application code and found that only
>INSERT, UPDATE  has COMMIT  and SELECT has no commit, We are using a lot of
"Ajax Suggest" in the all
>the forms accessed for fetching the data using SELECT statements which are
not explicitly committed.
>We have started updating the code on this.

You need a COMMIT for every BEGIN.  If you just run a SELECT statement
without first beginning a transaction, then you should not end up with a
connection that is Idle in Transaction.  If you are beginning a transaction,
doing a select, and then not committing, then yes that is a bug.

Dave





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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Use of sequence rather than index scan for one text column on one instance of a database
Следующее
От: keshav upadhyaya
Дата:
Сообщение: Regarding Sequential Scans count increase each time we press refresh .