EXPLAIN BUFFERS: dirtied

From: Vitaliy Garnashevich <vgarnashevich(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: EXPLAIN BUFFERS: dirtied
Date: 2018-01-29 18:31:53
Message-ID: 21a14f5f-b39c-3aa8-da2c-2112ee328b93@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

In EXPLAIN (ANALYZE, BUFFERS) for a SELECT query, I see the following
statistics under an Index Scan node:

Buffers: shared hit=8357288 read=6165444 dirtied=44820 written=5590

As far as I understand, that's the statistics for accesses to shared
buffers during the query:
- hit = required page was already in shared buffers
- read = required page was not in shared buffers, and was loaded from
disk (from filesystem cache)
- written = while loading the required page, there was no free space for
it in shared buffers, so some other dirty page was evicted from shared
buffers and was written to disk (to filesystem cache), to free some
space and to load the required page

But what is "dirtied" statistics? When a SELECT query could make pages
dirty?

Regards,
Vitaliy

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2018-01-29 18:38:35 Re: EXPLAIN BUFFERS: dirtied
Previous Message Pritam Barhate 2018-01-29 17:57:32 Re: Using AWS ephemeral SSD storage for production database workload?