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!!!!
Re: High CPU load on Postgres Server during Peak times!!!! |
Список | 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 по дате отправления: