AlexTatiyants / pev

Postgres Explain Visualizer
MIT License
2.77k stars 192 forks source link

Nodes not displaying "Heap Fetches" #48

Closed PikachuEXE closed 5 years ago

PikachuEXE commented 5 years ago

I notice the attribute "Heap Fetches" is missing from node even query plan output contains it I think this attribute is important for choosing optimization method(s) for queries.

My query plan input:

[
  {
    "Plan": {
      "Node Type": "Aggregate",
      "Strategy": "Plain",
      "Partial Mode": "Simple",
      "Parallel Aware": false,
      "Startup Cost": 334.64,
      "Total Cost": 334.64,
      "Plan Rows": 1,
      "Plan Width": 8,
      "Actual Startup Time": 218.423,
      "Actual Total Time": 218.423,
      "Actual Rows": 1,
      "Actual Loops": 1,
      "Output": ["count(*)"],
      "Shared Hit Blocks": 28609,
      "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,
      "Plans": [
        {
          "Node Type": "Index Only Scan",
          "Parent Relationship": "Outer",
          "Parallel Aware": false,
          "Scan Direction": "Forward",
          "Index Name": "idx_listings_on_cols_4_residential_rental_201811211018",
          "Relation Name": "listings",
          "Schema": "public",
          "Alias": "listings",
          "Startup Cost": 0.11,
          "Total Cost": 320.19,
          "Plan Rows": 28898,
          "Plan Width": 0,
          "Actual Startup Time": 0.151,
          "Actual Total Time": 215.381,
          "Actual Rows": 31109,
          "Actual Loops": 1,
          "Output": ["city_id", "searching_expired_at", "posted_at"],
          "Index Cond": "((listings.city_id = 1) AND (listings.searching_expired_at >= '2019-05-06 00:00:00'::timestamp without time zone) AND (listings.searching_expired_at <= '3019-05-06 00:00:00'::timestamp without time zone) AND (listings.posted_at IS NOT NULL))",
          "Rows Removed by Index Recheck": 0,
          "Heap Fetches": 10461,
          "Shared Hit Blocks": 28609,
          "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": 7.214,
    "Triggers": [
    ],
    "Execution Time": 218.479
  }
]
pgiraud commented 5 years ago

@PikachuEXE The Heap Fetches attribute is actually been displayed in the detail. Capture du 2019-08-27 09-21-42

Can you please elaborate what information is missing? Would you want this information to be highlighted?

Also please note that I've been working on a fork of PEV since it seems abandoned. https://dalibo.github.io/pev2

PikachuEXE commented 5 years ago

I am not sure if it's not included or I just didn't see it Closing the issue :P