Re: [GENERAL] 回复: postgres cpu 100% need help - Mailing list pgsql-general

From Jeff Janes
Subject Re: [GENERAL] 回复: postgres cpu 100% need help
Date
Msg-id CAMkU=1w08CQt0tCKEaA_aYVm=9AZdm2oMmima5CW2sOXpjwHtg@mail.gmail.com
Whole thread Raw
In response to 回复: postgres cpu 100% need help  ("657985552@qq.com" <657985552@qq.com>)
Responses Re: [GENERAL] Re: [GENERAL] 回复: postgres cpu 100% need help  (Merlin Moncure <mmoncure@gmail.com>)
List pgsql-general
On Mon, Oct 26, 2015 at 8:30 PM, 657985552@qq.com <657985552@qq.com> wrote:
Dear sir:
         Recently a wired question about postgresql database really bothered me a lot, so i really need your help. Here is the problem, in the most situations the postgre database work very well,  Average 3500tps/s per day, the cpu usage of its process is 3%~10% and every query can be responsed in less than 20ms, but sometimes the cpu usages of its process can suddenly grow up to 90%+ , at that time a simple query can cost  2000+ms. ps: My postgresql version is 9.3.5 and the database is oltp  server.

From all the lseeks on the same file, it looks like you are doing a sequential scan on a table for the inside of a nested loop.  What is the query it is running, and what is the execution plan for it?  To get that, run:

explain (analyze, buffers) select o_count from ....

Cheers,

Jeff

pgsql-general by date:

Previous
From: Merlin Moncure
Date:
Subject: Re: ??: postgres cpu 100% need help
Next
From: Merlin Moncure
Date:
Subject: Re: [GENERAL] Re: [GENERAL] 回复: postgres cpu 100% need help