Re: select statements have many shared_blks_dirtied and written - Mailing list pgsql-admin

From Laurenz Albe
Subject Re: select statements have many shared_blks_dirtied and written
Date
Msg-id 645a24ea6ca6055a0f81ea5927ba0a08e15157c2.camel@cybertec.at
Whole thread Raw
In response to select statements have many shared_blks_dirtied and written  (James Pang <jamespang886@gmail.com>)
List pgsql-admin
On Tue, 2024-02-20 at 16:20 +0800, James Pang wrote:
> We have several sql "select ... from ... where  ..." ,from pg_stat_statements,
> we found the select sql has many shared_blks_dirtied, shared_blks_written.
> is it by  "hint bits" updates ?  when checkpoint just completed, we saw many
> wal_fpi , wal_bytes with this select sql too.

Yes, that are probably hint bits.

One way to avoid that is to VACUUM the table after a bulk load, that
will set hint bits.

Yours,
Laurenz Albe



pgsql-admin by date:

Previous
From: James Pang
Date:
Subject: select statements have many shared_blks_dirtied and written
Next
From: Rajesh Kumar
Date:
Subject: Re: Wraparound