Skip to content

Instantly share code, notes, and snippets.

@kbrock
Created February 16, 2018 18:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kbrock/f25e7fede1e70566e4c07857cb5ad8ba to your computer and use it in GitHub Desktop.
Save kbrock/f25e7fede1e70566e4c07857cb5ad8ba to your computer and use it in GitHub Desktop.
delete from metrics_21
[
{
"Plan": {
"Node Type": "ModifyTable",
"Operation": "Delete",
"Relation Name": "metrics_21",
"Schema": "public",
"Alias": "metrics_21",
"Startup Cost": 25.53,
"Total Cost": 872.10,
"Plan Rows": 100,
"Plan Width": 38,
"Actual Startup Time": 13471.701,
"Actual Total Time": 13471.701,
"Actual Rows": 0,
"Actual Loops": 1,
"Shared Hit Blocks": 322,
"Shared Read Blocks": 1215895,
"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": "Nested Loop",
"Parent Relationship": "Member",
"Join Type": "Inner",
"Startup Cost": 25.53,
"Total Cost": 872.10,
"Plan Rows": 100,
"Plan Width": 38,
"Actual Startup Time": 13471.696,
"Actual Total Time": 13471.696,
"Actual Rows": 0,
"Actual Loops": 1,
"Output": ["metrics_21.ctid", "\"ANY_subquery\".*"],
"Shared Hit Blocks": 322,
"Shared Read Blocks": 1215895,
"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": "Aggregate",
"Strategy": "Hashed",
"Parent Relationship": "Outer",
"Startup Cost": 25.10,
"Total Cost": 26.10,
"Plan Rows": 100,
"Plan Width": 40,
"Actual Startup Time": 13471.454,
"Actual Total Time": 13471.477,
"Actual Rows": 100,
"Actual Loops": 1,
"Output": ["\"ANY_subquery\".*", "\"ANY_subquery\".id"],
"Group Key": ["\"ANY_subquery\".id"],
"Shared Hit Blocks": 22,
"Shared Read Blocks": 1215895,
"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": "Subquery Scan",
"Parent Relationship": "Outer",
"Alias": "ANY_subquery",
"Startup Cost": 0.00,
"Total Cost": 24.85,
"Plan Rows": 100,
"Plan Width": 40,
"Actual Startup Time": 13460.528,
"Actual Total Time": 13471.397,
"Actual Rows": 100,
"Actual Loops": 1,
"Output": ["\"ANY_subquery\".*", "\"ANY_subquery\".id"],
"Shared Hit Blocks": 22,
"Shared Read Blocks": 1215895,
"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": "Limit",
"Parent Relationship": "Subquery",
"Startup Cost": 0.00,
"Total Cost": 23.85,
"Plan Rows": 100,
"Plan Width": 8,
"Actual Startup Time": 13460.500,
"Actual Total Time": 13471.320,
"Actual Rows": 100,
"Actual Loops": 1,
"Output": ["metrics.id"],
"Shared Hit Blocks": 22,
"Shared Read Blocks": 1215895,
"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": "Append",
"Parent Relationship": "Outer",
"Startup Cost": 0.00,
"Total Cost": 4408596.95,
"Plan Rows": 18485622,
"Plan Width": 8,
"Actual Startup Time": 13460.498,
"Actual Total Time": 13471.295,
"Actual Rows": 100,
"Actual Loops": 1,
"Shared Hit Blocks": 22,
"Shared Read Blocks": 1215895,
"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": "Member",
"Relation Name": "metrics",
"Schema": "public",
"Alias": "metrics",
"Startup Cost": 0.00,
"Total Cost": 0.00,
"Plan Rows": 1,
"Plan Width": 8,
"Actual Startup Time": 0.001,
"Actual Total Time": 0.001,
"Actual Rows": 0,
"Actual Loops": 1,
"Output": ["metrics.id"],
"Filter": "(metrics.\"timestamp\" <= '2018-02-01 19:56:37.519979'::timestamp without time zone)",
"Rows Removed by Filter": 0,
"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
},
{
"Node Type": "Seq Scan",
"Parent Relationship": "Member",
"Relation Name": "metrics_00",
"Schema": "public",
"Alias": "metrics_00",
"Startup Cost": 0.00,
"Total Cost": 11.38,
"Plan Rows": 37,
"Plan Width": 8,
"Actual Startup Time": 0.000,
"Actual Total Time": 0.000,
"Actual Rows": 0,
"Actual Loops": 1,
"Output": ["metrics_00.id"],
"Filter": "(metrics_00.\"timestamp\" <= '2018-02-01 19:56:37.519979'::timestamp without time zone)",
"Rows Removed by Filter": 0,
"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
},
{
"Node Type": "Seq Scan",
"Parent Relationship": "Member",
"Relation Name": "metrics_01",
"Schema": "public",
"Alias": "metrics_01",
"Startup Cost": 0.00,
"Total Cost": 11.38,
"Plan Rows": 37,
"Plan Width": 8,
"Actual Startup Time": 0.000,
"Actual Total Time": 0.000,
"Actual Rows": 0,
"Actual Loops": 1,
"Output": ["metrics_01.id"],
"Filter": "(metrics_01.\"timestamp\" <= '2018-02-01 19:56:37.519979'::timestamp without time zone)",
"Rows Removed by Filter": 0,
"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
},
{
"Node Type": "Seq Scan",
"Parent Relationship": "Member",
"Relation Name": "metrics_02",
"Schema": "public",
"Alias": "metrics_02",
"Startup Cost": 0.00,
"Total Cost": 11.38,
"Plan Rows": 37,
"Plan Width": 8,
"Actual Startup Time": 0.000,
"Actual Total Time": 0.000,
"Actual Rows": 0,
"Actual Loops": 1,
"Output": ["metrics_02.id"],
"Filter": "(metrics_02.\"timestamp\" <= '2018-02-01 19:56:37.519979'::timestamp without time zone)",
"Rows Removed by Filter": 0,
"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
},
{
"Node Type": "Seq Scan",
"Parent Relationship": "Member",
"Relation Name": "metrics_03",
"Schema": "public",
"Alias": "metrics_03",
"Startup Cost": 0.00,
"Total Cost": 11.38,
"Plan Rows": 37,
"Plan Width": 8,
"Actual Startup Time": 0.001,
"Actual Total Time": 0.001,
"Actual Rows": 0,
"Actual Loops": 1,
"Output": ["metrics_03.id"],
"Filter": "(metrics_03.\"timestamp\" <= '2018-02-01 19:56:37.519979'::timestamp without time zone)",
"Rows Removed by Filter": 0,
"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
},
{
"Node Type": "Seq Scan",
"Parent Relationship": "Member",
"Relation Name": "metrics_04",
"Schema": "public",
"Alias": "metrics_04",
"Startup Cost": 0.00,
"Total Cost": 11.38,
"Plan Rows": 37,
"Plan Width": 8,
"Actual Startup Time": 0.000,
"Actual Total Time": 0.000,
"Actual Rows": 0,
"Actual Loops": 1,
"Output": ["metrics_04.id"],
"Filter": "(metrics_04.\"timestamp\" <= '2018-02-01 19:56:37.519979'::timestamp without time zone)",
"Rows Removed by Filter": 0,
"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
},
{
"Node Type": "Seq Scan",
"Parent Relationship": "Member",
"Relation Name": "metrics_05",
"Schema": "public",
"Alias": "metrics_05",
"Startup Cost": 0.00,
"Total Cost": 11.38,
"Plan Rows": 37,
"Plan Width": 8,
"Actual Startup Time": 0.000,
"Actual Total Time": 0.000,
"Actual Rows": 0,
"Actual Loops": 1,
"Output": ["metrics_05.id"],
"Filter": "(metrics_05.\"timestamp\" <= '2018-02-01 19:56:37.519979'::timestamp without time zone)",
"Rows Removed by Filter": 0,
"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
},
{
"Node Type": "Index Scan",
"Parent Relationship": "Member",
"Scan Direction": "Forward",
"Index Name": "index_metrics_06_on_ts_and_capture_interval_name",
"Relation Name": "metrics_06",
"Schema": "public",
"Alias": "metrics_06",
"Startup Cost": 0.39,
"Total Cost": 281.02,
"Plan Rows": 1,
"Plan Width": 8,
"Actual Startup Time": 0.011,
"Actual Total Time": 0.011,
"Actual Rows": 0,
"Actual Loops": 1,
"Output": ["metrics_06.id"],
"Index Cond": "(metrics_06.\"timestamp\" <= '2018-02-01 19:56:37.519979'::timestamp without time zone)",
"Rows Removed by Index Recheck": 0,
"Shared Hit Blocks": 3,
"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
},
{
"Node Type": "Index Scan",
"Parent Relationship": "Member",
"Scan Direction": "Forward",
"Index Name": "index_metrics_07_on_ts_and_capture_interval_name",
"Relation Name": "metrics_07",
"Schema": "public",
"Alias": "metrics_07",
"Startup Cost": 0.39,
"Total Cost": 2286.23,
"Plan Rows": 1,
"Plan Width": 8,
"Actual Startup Time": 0.004,
"Actual Total Time": 0.004,
"Actual Rows": 0,
"Actual Loops": 1,
"Output": ["metrics_07.id"],
"Index Cond": "(metrics_07.\"timestamp\" <= '2018-02-01 19:56:37.519979'::timestamp without time zone)",
"Rows Removed by Index Recheck": 0,
"Shared Hit Blocks": 3,
"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
},
{
"Node Type": "Index Scan",
"Parent Relationship": "Member",
"Scan Direction": "Forward",
"Index Name": "index_metrics_08_on_ts_and_capture_interval_name",
"Relation Name": "metrics_08",
"Schema": "public",
"Alias": "metrics_08",
"Startup Cost": 0.12,
"Total Cost": 8.14,
"Plan Rows": 1,
"Plan Width": 8,
"Actual Startup Time": 0.002,
"Actual Total Time": 0.002,
"Actual Rows": 0,
"Actual Loops": 1,
"Output": ["metrics_08.id"],
"Index Cond": "(metrics_08.\"timestamp\" <= '2018-02-01 19:56:37.519979'::timestamp without time zone)",
"Rows Removed by Index Recheck": 0,
"Shared Hit Blocks": 1,
"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
},
{
"Node Type": "Index Scan",
"Parent Relationship": "Member",
"Scan Direction": "Forward",
"Index Name": "index_metrics_09_on_ts_and_capture_interval_name",
"Relation Name": "metrics_09",
"Schema": "public",
"Alias": "metrics_09",
"Startup Cost": 0.40,
"Total Cost": 222.58,
"Plan Rows": 1,
"Plan Width": 8,
"Actual Startup Time": 0.004,
"Actual Total Time": 0.004,
"Actual Rows": 0,
"Actual Loops": 1,
"Output": ["metrics_09.id"],
"Index Cond": "(metrics_09.\"timestamp\" <= '2018-02-01 19:56:37.519979'::timestamp without time zone)",
"Rows Removed by Index Recheck": 0,
"Shared Hit Blocks": 3,
"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
},
{
"Node Type": "Bitmap Heap Scan",
"Parent Relationship": "Member",
"Relation Name": "metrics_10",
"Schema": "public",
"Alias": "metrics_10",
"Startup Cost": 1808.68,
"Total Cost": 6977.71,
"Plan Rows": 1566,
"Plan Width": 8,
"Actual Startup Time": 0.019,
"Actual Total Time": 0.019,
"Actual Rows": 0,
"Actual Loops": 1,
"Output": ["metrics_10.id"],
"Recheck Cond": "(metrics_10.\"timestamp\" <= '2018-02-01 19:56:37.519979'::timestamp without time zone)",
"Rows Removed by Index Recheck": 0,
"Exact Heap Blocks": 0,
"Lossy Heap Blocks": 0,
"Shared Hit Blocks": 4,
"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,
"Plans": [
{
"Node Type": "Bitmap Index Scan",
"Parent Relationship": "Outer",
"Index Name": "index_metrics_10_on_ts_and_capture_interval_name",
"Startup Cost": 0.00,
"Total Cost": 1808.29,
"Plan Rows": 1566,
"Plan Width": 0,
"Actual Startup Time": 0.014,
"Actual Total Time": 0.014,
"Actual Rows": 0,
"Actual Loops": 1,
"Index Cond": "(metrics_10.\"timestamp\" <= '2018-02-01 19:56:37.519979'::timestamp without time zone)",
"Shared Hit Blocks": 4,
"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
}
]
},
{
"Node Type": "Seq Scan",
"Parent Relationship": "Member",
"Relation Name": "metrics_11",
"Schema": "public",
"Alias": "metrics_11",
"Startup Cost": 0.00,
"Total Cost": 245446.61,
"Plan Rows": 487284,
"Plan Width": 8,
"Actual Startup Time": 2738.208,
"Actual Total Time": 2738.208,
"Actual Rows": 0,
"Actual Loops": 1,
"Output": ["metrics_11.id"],
"Filter": "(metrics_11.\"timestamp\" <= '2018-02-01 19:56:37.519979'::timestamp without time zone)",
"Rows Removed by Filter": 0,
"Shared Hit Blocks": 0,
"Shared Read Blocks": 227094,
"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": "Index Scan",
"Parent Relationship": "Member",
"Scan Direction": "Forward",
"Index Name": "index_metrics_12_on_ts_and_capture_interval_name",
"Relation Name": "metrics_12",
"Schema": "public",
"Alias": "metrics_12",
"Startup Cost": 0.55,
"Total Cost": 284.03,
"Plan Rows": 66,
"Plan Width": 8,
"Actual Startup Time": 0.018,
"Actual Total Time": 0.018,
"Actual Rows": 0,
"Actual Loops": 1,
"Output": ["metrics_12.id"],
"Index Cond": "(metrics_12.\"timestamp\" <= '2018-02-01 19:56:37.519979'::timestamp without time zone)",
"Rows Removed by Index Recheck": 0,
"Shared Hit Blocks": 4,
"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
},
{
"Node Type": "Seq Scan",
"Parent Relationship": "Member",
"Relation Name": "metrics_13",
"Schema": "public",
"Alias": "metrics_13",
"Startup Cost": 0.00,
"Total Cost": 486237.14,
"Plan Rows": 1823609,
"Plan Width": 8,
"Actual Startup Time": 5160.936,
"Actual Total Time": 5160.936,
"Actual Rows": 0,
"Actual Loops": 1,
"Output": ["metrics_13.id"],
"Filter": "(metrics_13.\"timestamp\" <= '2018-02-01 19:56:37.519979'::timestamp without time zone)",
"Rows Removed by Filter": 0,
"Shared Hit Blocks": 0,
"Shared Read Blocks": 463441,
"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": "Seq Scan",
"Parent Relationship": "Member",
"Relation Name": "metrics_14",
"Schema": "public",
"Alias": "metrics_14",
"Startup Cost": 0.00,
"Total Cost": 103778.50,
"Plan Rows": 271425,
"Plan Width": 8,
"Actual Startup Time": 1079.792,
"Actual Total Time": 1079.792,
"Actual Rows": 0,
"Actual Loops": 1,
"Output": ["metrics_14.id"],
"Filter": "(metrics_14.\"timestamp\" <= '2018-02-01 19:56:37.519979'::timestamp without time zone)",
"Rows Removed by Filter": 0,
"Shared Hit Blocks": 0,
"Shared Read Blocks": 100368,
"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": "Seq Scan",
"Parent Relationship": "Member",
"Relation Name": "metrics_15",
"Schema": "public",
"Alias": "metrics_15",
"Startup Cost": 0.00,
"Total Cost": 435378.46,
"Plan Rows": 1451402,
"Plan Width": 8,
"Actual Startup Time": 4396.432,
"Actual Total Time": 4396.432,
"Actual Rows": 0,
"Actual Loops": 1,
"Output": ["metrics_15.id"],
"Filter": "(metrics_15.\"timestamp\" <= '2018-02-01 19:56:37.519979'::timestamp without time zone)",
"Rows Removed by Filter": 0,
"Shared Hit Blocks": 0,
"Shared Read Blocks": 416837,
"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": "Seq Scan",
"Parent Relationship": "Member",
"Relation Name": "metrics_16",
"Schema": "public",
"Alias": "metrics_16",
"Startup Cost": 0.00,
"Total Cost": 25891.25,
"Plan Rows": 1411022,
"Plan Width": 8,
"Actual Startup Time": 84.966,
"Actual Total Time": 84.966,
"Actual Rows": 0,
"Actual Loops": 1,
"Output": ["metrics_16.id"],
"Filter": "(metrics_16.\"timestamp\" <= '2018-02-01 19:56:37.519979'::timestamp without time zone)",
"Rows Removed by Filter": 0,
"Shared Hit Blocks": 0,
"Shared Read Blocks": 8144,
"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": "Bitmap Heap Scan",
"Parent Relationship": "Member",
"Relation Name": "metrics_17",
"Schema": "public",
"Alias": "metrics_17",
"Startup Cost": 15380.68,
"Total Cost": 205479.54,
"Plan Rows": 87291,
"Plan Width": 8,
"Actual Startup Time": 0.023,
"Actual Total Time": 0.023,
"Actual Rows": 0,
"Actual Loops": 1,
"Output": ["metrics_17.id"],
"Recheck Cond": "(metrics_17.\"timestamp\" <= '2018-02-01 19:56:37.519979'::timestamp without time zone)",
"Rows Removed by Index Recheck": 0,
"Exact Heap Blocks": 0,
"Lossy Heap Blocks": 0,
"Shared Hit Blocks": 1,
"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,
"Plans": [
{
"Node Type": "Bitmap Index Scan",
"Parent Relationship": "Outer",
"Index Name": "index_metrics_17_on_ts_and_capture_interval_name",
"Startup Cost": 0.00,
"Total Cost": 15358.86,
"Plan Rows": 87291,
"Plan Width": 0,
"Actual Startup Time": 0.018,
"Actual Total Time": 0.018,
"Actual Rows": 0,
"Actual Loops": 1,
"Index Cond": "(metrics_17.\"timestamp\" <= '2018-02-01 19:56:37.519979'::timestamp without time zone)",
"Shared Hit Blocks": 1,
"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
}
]
},
{
"Node Type": "Seq Scan",
"Parent Relationship": "Member",
"Relation Name": "metrics_18",
"Schema": "public",
"Alias": "metrics_18",
"Startup Cost": 0.00,
"Total Cost": 421031.66,
"Plan Rows": 1608526,
"Plan Width": 8,
"Actual Startup Time": 0.067,
"Actual Total Time": 10.847,
"Actual Rows": 100,
"Actual Loops": 1,
"Output": ["metrics_18.id"],
"Filter": "(metrics_18.\"timestamp\" <= '2018-02-01 19:56:37.519979'::timestamp without time zone)",
"Rows Removed by Filter": 0,
"Shared Hit Blocks": 3,
"Shared Read Blocks": 11,
"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": "Seq Scan",
"Parent Relationship": "Member",
"Relation Name": "metrics_19",
"Schema": "public",
"Alias": "metrics_19",
"Startup Cost": 0.00,
"Total Cost": 493598.59,
"Plan Rows": 2990170,
"Plan Width": 8,
"Actual Startup Time": 0.000,
"Actual Total Time": 0.000,
"Actual Rows": 0,
"Actual Loops": 0,
"Output": ["metrics_19.id"],
"Filter": "(metrics_19.\"timestamp\" <= '2018-02-01 19:56:37.519979'::timestamp without time zone)",
"Rows Removed by Filter": 0,
"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
},
{
"Node Type": "Seq Scan",
"Parent Relationship": "Member",
"Relation Name": "metrics_20",
"Schema": "public",
"Alias": "metrics_20",
"Startup Cost": 0.00,
"Total Cost": 492859.35,
"Plan Rows": 2080476,
"Plan Width": 8,
"Actual Startup Time": 0.000,
"Actual Total Time": 0.000,
"Actual Rows": 0,
"Actual Loops": 0,
"Output": ["metrics_20.id"],
"Filter": "(metrics_20.\"timestamp\" <= '2018-02-01 19:56:37.519979'::timestamp without time zone)",
"Rows Removed by Filter": 0,
"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
},
{
"Node Type": "Seq Scan",
"Parent Relationship": "Member",
"Relation Name": "metrics_21",
"Schema": "public",
"Alias": "metrics_21_1",
"Startup Cost": 0.00,
"Total Cost": 496204.62,
"Plan Rows": 2088911,
"Plan Width": 8,
"Actual Startup Time": 0.000,
"Actual Total Time": 0.000,
"Actual Rows": 0,
"Actual Loops": 0,
"Output": ["metrics_21_1.id"],
"Filter": "(metrics_21_1.\"timestamp\" <= '2018-02-01 19:56:37.519979'::timestamp without time zone)",
"Rows Removed by Filter": 0,
"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
},
{
"Node Type": "Seq Scan",
"Parent Relationship": "Member",
"Relation Name": "metrics_22",
"Schema": "public",
"Alias": "metrics_22",
"Startup Cost": 0.00,
"Total Cost": 496263.41,
"Plan Rows": 2103562,
"Plan Width": 8,
"Actual Startup Time": 0.000,
"Actual Total Time": 0.000,
"Actual Rows": 0,
"Actual Loops": 0,
"Output": ["metrics_22.id"],
"Filter": "(metrics_22.\"timestamp\" <= '2018-02-01 19:56:37.519979'::timestamp without time zone)",
"Rows Removed by Filter": 0,
"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
},
{
"Node Type": "Seq Scan",
"Parent Relationship": "Member",
"Relation Name": "metrics_23",
"Schema": "public",
"Alias": "metrics_23",
"Startup Cost": 0.00,
"Total Cost": 496299.85,
"Plan Rows": 2080085,
"Plan Width": 8,
"Actual Startup Time": 0.000,
"Actual Total Time": 0.000,
"Actual Rows": 0,
"Actual Loops": 0,
"Output": ["metrics_23.id"],
"Filter": "(metrics_23.\"timestamp\" <= '2018-02-01 19:56:37.519979'::timestamp without time zone)",
"Rows Removed by Filter": 0,
"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
}
]
}
]
}
]
}
]
},
{
"Node Type": "Index Scan",
"Parent Relationship": "Inner",
"Scan Direction": "Forward",
"Index Name": "metrics_21_pkey",
"Relation Name": "metrics_21",
"Schema": "public",
"Alias": "metrics_21",
"Startup Cost": 0.43,
"Total Cost": 8.45,
"Plan Rows": 1,
"Plan Width": 14,
"Actual Startup Time": 0.002,
"Actual Total Time": 0.002,
"Actual Rows": 0,
"Actual Loops": 100,
"Output": ["metrics_21.ctid", "metrics_21.id"],
"Index Cond": "(metrics_21.id = \"ANY_subquery\".id)",
"Rows Removed by Index Recheck": 0,
"Shared Hit Blocks": 300,
"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
}
]
}
]
},
"Planning Time": 227.956,
"Triggers": [
],
"Execution Time": 13472.351
}
]
EXPLAIN (COSTS, ANALYZE, VERBOSE, BUFFERS, FORMAT JSON)
DELETE FROM "metrics_21"
WHERE "metrics_21"."id" IN (
SELECT "metrics"."id"
FROM "metrics"
WHERE ("metrics"."timestamp" <= '2018-02-01 19:56:37.519979')
LIMIT 100
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment