Number of Shared Blocks Hit

From: luis(dot)roberto(at)siscobra(dot)com(dot)br
To: pgsql-bugs <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Number of Shared Blocks Hit
Date: 2021-03-04 11:23:07
Message-ID: 295851993.7384397.1614856987194.JavaMail.zimbra@siscobra.com.br
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi,

While running a update, and checking EXPLAIN ANALYZE output, I found it strange that in the "ModifyTable" node, it shows "Shared Hit Blocks":351938580. If my math is correct, that amounts to more than 2.5TB.

The table itself has only 8GB, and 12 with indices:

pg_table_size|pg_total_relation_size|
-------------|----------------------|
8316043264| 12471787520|

The update statements was: UPDATE inconsistencia SET incondatinc = remincdatcad::timestamp

"incondatinc" was a freshly added column with "now()" as default value.

Is this value correct?

Here's the parsed plan: https://explain.dalibo.com/plan/LTN

[
{
"Plan": {
"Node Type": "ModifyTable",
"Operation": "Update",
"Parallel Aware": false,
"Relation Name": "inconsistencia",
"Schema": "public",
"Alias": "inconsistencia",
"Startup Cost": 0.00,
"Total Cost": 821781.08,
"Plan Rows": 26132966,
"Plan Width": 129,
"Actual Startup Time": 235607.729,
"Actual Total Time": 235607.730,
"Actual Rows": 0,
"Actual Loops": 1,
"Shared Hit Blocks": 351938580,
"Shared Read Blocks": 762606,
"Shared Dirtied Blocks": 1565402,
"Shared Written Blocks": 774916,
"Local Hit Blocks": 0,
"Local Read Blocks": 0,
"Local Dirtied Blocks": 0,
"Local Written Blocks": 0,
"Temp Read Blocks": 0,
"Temp Written Blocks": 0,
"I/O Read Time": 22884.559,
"I/O Write Time": 4.956,
"Plans": [
{
"Node Type": "Seq Scan",
"Parent Relationship": "Member",
"Parallel Aware": false,
"Relation Name": "inconsistencia",
"Schema": "public",
"Alias": "inconsistencia",
"Startup Cost": 0.00,
"Total Cost": 821781.08,
"Plan Rows": 26132966,
"Plan Width": 129,
"Actual Startup Time": 0.008,
"Actual Total Time": 13767.894,
"Actual Rows": 26141470,
"Actual Loops": 1,
"Output": ["remitemseq", "remincdevnom", "remincnumcon", "inccod", "remincobs", "remincrem", "remincdevcod", "carcod", "remincnumpar", "reminclin", "remincreg", "remincdatcad", "(remincdatcad)::timestamp without time zone", "ctid"],
"Shared Hit Blocks": 48185,
"Shared Read Blocks": 446934,
"Shared Dirtied Blocks": 42,
"Shared Written Blocks": 886,
"Local Hit Blocks": 0,
"Local Read Blocks": 0,
"Local Dirtied Blocks": 0,
"Local Written Blocks": 0,
"Temp Read Blocks": 0,
"Temp Written Blocks": 0,
"I/O Read Time": 7726.779,
"I/O Write Time": 4.956
}
]
},
"Planning": {
"Shared Hit Blocks": 0,
"Shared Read Blocks": 0,
"Shared Dirtied Blocks": 0,
"Shared Written Blocks": 0,
"Local Hit Blocks": 0,
"Local Read Blocks": 0,
"Local Dirtied Blocks": 0,
"Local Written Blocks": 0,
"Temp Read Blocks": 0,
"Temp Written Blocks": 0,
"I/O Read Time": 0.000,
"I/O Write Time": 0.000
},
"Planning Time": 0.054,
"Triggers": [
],
"Execution Time": 235607.759
}
]

Luis R. Weck

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Euler Taveira 2021-03-04 12:39:53 Re: BUG #16912: pg_dump 11 does not respect --quote-all-identifiers within function bodies
Previous Message PG Bug reporting form 2021-03-04 11:21:05 BUG #16915: use psql have error "could not change directory to "/root": Permission denied"