Re: Intermittent Query Performance Issue

From: Ron Johnson <ronljohnsonjr(at)gmail(dot)com>
To: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Intermittent Query Performance Issue
Date: 2024-04-20 02:08:24
Message-ID: CANzqJaCrc92PgnogA7o9qHuG3geAZjou8ZJyvYYE9c-nDGTYJQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Fri, Apr 19, 2024 at 1:03 PM Murthy Nunna <mnunna(at)fnal(dot)gov> wrote:

> Hi,
>
>
>
> I am running pg 14.4
>
>
>
> I have a simple query :
>
> select max(c) from tab1 where name = 'xxx’ ;
>
>
>
> This query runs some times very slow. It takes about 40 minutes.
>
> Most of the time it completes in few seconds.
>
> When it runs slow, wait_event in pg_stat_activity shows “DataFileRead”.
> Obviously, it is reading from file storage and that is why it is taking so
> long.
>

What else is happening on that system when it runs very slow? To me,
“DataFileRead” screams IO contention.

> This is a big table 512GB. It has some child tables.
>
>
>
> Is there a way I can reproduce the slowness at will, so I can attempt to
> tune it? Or any ideas I can try to fix the issue? I hate to try something
> not knowing if the problem is fixed or not. That is the reason I would like
> to reproduce the issue first.
>

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Murthy Nunna 2024-04-20 02:44:57 RE: Intermittent Query Performance Issue
Previous Message Murthy Nunna 2024-04-19 17:02:41 Intermittent Query Performance Issue