Re: CPU SPIKE - Mailing list pgsql-general

From Tomas Vondra
Subject Re: CPU SPIKE
Date
Msg-id 20191021060137.6uetb242vw44hudo@development
Whole thread Raw
In response to CPU SPIKE  (Pawan Sharma <pawanpg0963@gmail.com>)
List pgsql-general
On Mon, Oct 21, 2019 at 10:45:33AM +0530, Pawan Sharma wrote:
>Hi All,
>
>Having real high CPU issue (95-98%), with SELECT statements and select
>queries contains multiple AND operator, is it will cause any CPU Spike..???
>
>apps team is using sub-partition, PG11, CPU:24, Mem: 16GB
>

Any query execution is using CPU, so yes - it can cause a spike in CPU
usage. The question is whether the query plan is efficient, or whether
it's using the CPU unenecessarily. You need to show us EXPLAIN ANALYZE
and perhaps explain why you think it shouldn't use this much CPU.

regards

-- 
Tomas Vondra                  http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



pgsql-general by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: CPU SPIKE
Next
From: Tomas Vondra
Date:
Subject: Re: jsonb_set() strictness considered harmful to data