From 2705720c537d17501e93f8e64a4206d4c0684fb6 Mon Sep 17 00:00:00 2001 From: Marcus Gartner Date: Thu, 24 Oct 2019 15:10:24 -0700 Subject: [PATCH] Add examples in docs/ --- docs/flamegraph.html | 145 ++++++++++++++++++++++++++++++++++++++++++ docs/plan.json | 147 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 292 insertions(+) create mode 100644 docs/flamegraph.html create mode 100644 docs/plan.json diff --git a/docs/flamegraph.html b/docs/flamegraph.html new file mode 100644 index 0000000..531e371 --- /dev/null +++ b/docs/flamegraph.html @@ -0,0 +1,145 @@ + + + + + + + + + + + + + pg_flame + + + + + +
+
+ + +
+
+
+
+
+
+
+ + + + + + + + diff --git a/docs/plan.json b/docs/plan.json new file mode 100644 index 0000000..dcb7f0f --- /dev/null +++ b/docs/plan.json @@ -0,0 +1,147 @@ +[ + { + "Plan": { + "Node Type": "Aggregate", + "Strategy": "Hashed", + "Partial Mode": "Simple", + "Parallel Aware": false, + "Startup Cost": 2714.13, + "Total Cost": 2776.27, + "Plan Rows": 1657, + "Plan Width": 33, + "Actual Startup Time": 62.412, + "Actual Total Time": 62.923, + "Actual Rows": 106, + "Actual Loops": 1, + "Group Key": ["u.id"], + "Filter": "(count(*) > 1)", + "Rows Removed by Filter": 4758, + "Shared Hit Blocks": 2, + "Shared Read Blocks": 813, + "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, + "Plans": [ + { + "Node Type": "Hash Join", + "Parent Relationship": "Outer", + "Parallel Aware": false, + "Join Type": "Inner", + "Startup Cost": 271.14, + "Total Cost": 2676.85, + "Plan Rows": 4971, + "Plan Width": 25, + "Actual Startup Time": 19.974, + "Actual Total Time": 60.106, + "Actual Rows": 4971, + "Actual Loops": 1, + "Inner Unique": false, + "Hash Cond": "(u.id = posts.user_id)", + "Shared Hit Blocks": 2, + "Shared Read Blocks": 813, + "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, + "Plans": [ + { + "Node Type": "Seq Scan", + "Parent Relationship": "Outer", + "Parallel Aware": false, + "Relation Name": "users", + "Alias": "u", + "Startup Cost": 0.00, + "Total Cost": 1731.00, + "Plan Rows": 100000, + "Plan Width": 25, + "Actual Startup Time": 0.007, + "Actual Total Time": 24.358, + "Actual Rows": 100000, + "Actual Loops": 1, + "Shared Hit Blocks": 2, + "Shared Read Blocks": 729, + "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 + }, + { + "Node Type": "Hash", + "Parent Relationship": "Inner", + "Parallel Aware": false, + "Startup Cost": 209.00, + "Total Cost": 209.00, + "Plan Rows": 4971, + "Plan Width": 4, + "Actual Startup Time": 19.902, + "Actual Total Time": 19.902, + "Actual Rows": 4971, + "Actual Loops": 1, + "Hash Buckets": 8192, + "Original Hash Buckets": 8192, + "Hash Batches": 1, + "Original Hash Batches": 1, + "Peak Memory Usage": 239, + "Shared Hit Blocks": 0, + "Shared Read Blocks": 84, + "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, + "Plans": [ + { + "Node Type": "Seq Scan", + "Parent Relationship": "Outer", + "Parallel Aware": false, + "Relation Name": "posts", + "Alias": "posts", + "Startup Cost": 0.00, + "Total Cost": 209.00, + "Plan Rows": 4971, + "Plan Width": 4, + "Actual Startup Time": 0.289, + "Actual Total Time": 18.660, + "Actual Rows": 4971, + "Actual Loops": 1, + "Filter": "((title)::text ~ '.*sql.*'::text)", + "Rows Removed by Filter": 5029, + "Shared Hit Blocks": 0, + "Shared Read Blocks": 84, + "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 + } + ] + } + ] + } + ] + }, + "Planning Time": 8.447, + "Triggers": [ + ], + "Execution Time": 63.181 + } +]