Re: CPU SPIKE

From: Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>
To: Pawan Sharma <pawanpg0963(at)gmail(dot)com>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: CPU SPIKE
Date: 2019-10-21 06:01:37
Message-ID: 20191021060137.6uetb242vw44hudo@development
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

  • CPU SPIKE at 2019-10-21 05:15:33 from Pawan Sharma

Browse pgsql-general by date

  From Date Subject
Next Message Tomas Vondra 2019-10-21 06:07:01 Re: jsonb_set() strictness considered harmful to data
Previous Message Pavel Stehule 2019-10-21 05:40:19 Re: CPU SPIKE