Re: EXPLAIN BUFFERS: dirtied

2018-01-29 Thread Tomas Vondra
On 01/29/2018 08:21 PM, Vitaliy Garnashevich wrote: > I've read this article: https://wiki.postgresql.org/wiki/Hint_Bits > > It says: > >> A plain SELECT, count(*), or VACUUM on the entire table will check >> every tuple for visibility and set its hint bits. > > Suppose, a new page was

Re: EXPLAIN BUFFERS: dirtied

2018-01-29 Thread Vitaliy Garnashevich
I've read this article: https://wiki.postgresql.org/wiki/Hint_Bits It says: A plain SELECT, count(*), or VACUUM on the entire table will check every tuple for visibility and set its hint bits. Suppose, a new page was created using many INSERTs, and then was written to disk during a

Re: EXPLAIN BUFFERS: dirtied

2018-01-29 Thread Tom Lane
Vitaliy Garnashevich writes: > But what is "dirtied" statistics? When a SELECT query could make pages > dirty? Setting hint bits on recently-committed rows. regards, tom lane

EXPLAIN BUFFERS: dirtied

2018-01-29 Thread Vitaliy Garnashevich
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