explain.depesz.com

PostgreSQL's explain analyze made readable

Result: agKZ

Settings
# exclusive inclusive rows x rows loops node
1. 2,986.035 8,384.865 ↑ 1.0 1 1

Aggregate (cost=90,565.99..90,566.00 rows=1 width=32) (actual time=8,384.840..8,384.865 rows=1 loops=1)

2. 0.006 5,204.590 ↑ 1.0 1 1

Nested Loop Left Join (cost=90,564.90..90,565.97 rows=1 width=64) (actual time=5,204.560..5,204.590 rows=1 loops=1)

3. 0.004 5,203.550 ↑ 1.0 1 1

Nested Loop Left Join (cost=90,012.20..90,013.24 rows=1 width=36) (actual time=5,203.528..5,203.550 rows=1 loops=1)

4. 0.031 0.031 ↑ 1.0 1 1

Seq Scan on vendor (cost=0.00..1.01 rows=1 width=4) (actual time=0.026..0.031 rows=1 loops=1)

  • Filter: (id = 1)
  • Rows Removed by Filter: 3
5. 376.302 5,203.515 ↑ 1.0 1 1

Aggregate (cost=90,012.20..90,012.21 rows=1 width=32) (actual time=5,203.500..5,203.515 rows=1 loops=1)

6. 2.783 4,814.498 ↓ 13.0 12,715 1

Nested Loop Left Join (cost=91.84..89,997.54 rows=977 width=96) (actual time=0.511..4,814.498 rows=12,715 loops=1)

7. 3.085 1,251.515 ↓ 13.0 12,715 1

Nested Loop Left Join (cost=31.89..31,393.55 rows=977 width=76) (actual time=0.180..1,251.515 rows=12,715 loops=1)

8. 3.583 243.945 ↓ 13.0 12,715 1

Nested Loop Left Join (cost=7.84..7,867.39 rows=977 width=44) (actual time=0.077..243.945 rows=12,715 loops=1)

9. 3.743 11.492 ↓ 13.0 12,715 1

Unique (cost=0.28..443.41 rows=977 width=12) (actual time=0.033..11.492 rows=12,715 loops=1)

10. 1.339 7.749 ↓ 1.3 12,715 1

Custom Scan (ChunkAppend) on instance_cost (cost=0.28..418.99 rows=9,770 width=12) (actual time=0.030..7.749 rows=12,715 loops=1)

  • Order: instance_cost.end_time
  • Chunks excluded during runtime: 0
11. 2.992 2.992 ↑ 1.0 6,790 1

Index Scan Backward using _hyper_51_113_chunk_instance_cost_end_time_idx on _hyper_51_113_chunk (cost=0.28..281.82 rows=6,792 width=12) (actual time=0.013..2.992 rows=6,790 loops=1)

  • Index Cond: (end_time >= '2020-10-03 04:47:15'::timestamp without time zone)
  • Filter: (vendor.id = vendor_id)
12. 3.418 3.418 ↓ 2.0 5,925 1

Index Only Scan Backward using _hyper_51_111_chunk_instance_cost_vendor_id_end_time_idx on _hyper_51_111_chunk (cost=0.28..137.16 rows=2,978 width=12) (actual time=0.011..3.418 rows=5,925 loops=1)

  • Index Cond: ((vendor_id = vendor.id) AND (end_time >= '2020-10-03 04:47:15'::timestamp without time zone))
  • Heap Fetches: 3,578
13. 38.145 228.870 ↑ 1.0 1 12,715

Aggregate (cost=7.56..7.57 rows=1 width=32) (actual time=0.018..0.018 rows=1 loops=12,715)

14. 165.295 190.725 ↑ 3.0 1 12,715

Custom Scan (ChunkAppend) on instance_cost instance_cost_1 (cost=0.28..7.51 rows=3 width=28) (actual time=0.014..0.015 rows=1 loops=12,715)

  • Chunks excluded during runtime: 2
15. 11.850 11.850 ↑ 1.0 1 5,925

Index Scan using _hyper_51_111_chunk_instance_cost_vendor_id_end_time_idx on _hyper_51_111_chunk _hyper_51_111_chunk_1 (cost=0.28..2.50 rows=1 width=28) (actual time=0.002..0.002 rows=1 loops=5,925)

  • Index Cond: ((vendor_id = instance_cost.vendor_id) AND (end_time = instance_cost.end_time))
  • Filter: (provider = ANY ('{amazon}'::text[]))
16. 0.000 0.000 ↓ 0.0 0

Index Scan using _hyper_51_112_chunk_instance_cost_vendor_id_end_time_idx on _hyper_51_112_chunk (cost=0.28..2.50 rows=1 width=28) (never executed)

  • Index Cond: ((vendor_id = instance_cost.vendor_id) AND (end_time = instance_cost.end_time))
  • Filter: (provider = ANY ('{amazon}'::text[]))
17. 13.580 13.580 ↑ 1.0 1 6,790

Index Scan using _hyper_51_113_chunk_instance_cost_vendor_id_end_time_idx on _hyper_51_113_chunk _hyper_51_113_chunk_1 (cost=0.28..2.50 rows=1 width=28) (actual time=0.002..0.002 rows=1 loops=6,790)

  • Index Cond: ((vendor_id = instance_cost.vendor_id) AND (end_time = instance_cost.end_time))
  • Filter: (provider = ANY ('{amazon}'::text[]))
18.          

SubPlan (for Aggregate)

19. 0.000 0.000 ↑ 1.0 1 12,715

Result (cost=0.00..0.01 rows=1 width=32) (actual time=0.000..0.000 rows=1 loops=12,715)

20. 76.290 1,004.485 ↑ 1.0 1 12,715

Aggregate (cost=24.05..24.06 rows=1 width=32) (actual time=0.079..0.079 rows=1 loops=12,715)

21. 25.430 928.195 ↓ 2.0 2 12,715

Nested Loop (cost=0.15..24.03 rows=1 width=24) (actual time=0.054..0.073 rows=2 loops=12,715)

22. 38.145 38.145 ↓ 4.0 4 12,715

Seq Scan on node _6__be_0_node (cost=0.00..10.34 rows=1 width=4) (actual time=0.001..0.003 rows=4 loops=12,715)

  • Filter: (provider = ANY ('{amazon}'::text[]))
  • Rows Removed by Filter: 2
23. 762.900 864.620 ↓ 0.0 0 50,860

Custom Scan (ChunkAppend) on node_cost (cost=0.15..13.65 rows=5 width=24) (actual time=0.017..0.017 rows=0 loops=50,860)

  • Chunks excluded during runtime: 4
24. 0.000 0.000 ↓ 0.0 0

Index Scan using _hyper_4_2_chunk_node_cost_vendor_id_end_time_idx on _hyper_4_2_chunk (cost=0.15..2.37 rows=1 width=24) (never executed)

  • Index Cond: ((vendor_id = instance_cost.vendor_id) AND (end_time = instance_cost.end_time))
  • Filter: (_6__be_0_node.id = node_id)
25. 0.000 0.000 ↓ 0.0 0

Index Scan using _hyper_4_15_chunk_node_cost_vendor_id_end_time_idx on _hyper_4_15_chunk (cost=0.15..2.37 rows=1 width=24) (never executed)

  • Index Cond: ((vendor_id = instance_cost.vendor_id) AND (end_time = instance_cost.end_time))
  • Filter: (_6__be_0_node.id = node_id)
26. 0.000 0.000 ↓ 0.0 0

Index Scan using _hyper_4_19_chunk_node_cost_vendor_id_end_time_idx on _hyper_4_19_chunk (cost=0.41..3.14 rows=1 width=24) (never executed)

  • Index Cond: ((vendor_id = instance_cost.vendor_id) AND (end_time = instance_cost.end_time))
  • Filter: (_6__be_0_node.id = node_id)
27. 54.320 54.320 ↓ 0.0 0 27,160

Index Scan using _hyper_4_37_chunk_node_cost_vendor_id_end_time_idx on _hyper_4_37_chunk (cost=0.41..3.14 rows=1 width=24) (actual time=0.002..0.002 rows=0 loops=27,160)

  • Index Cond: ((vendor_id = instance_cost.vendor_id) AND (end_time = instance_cost.end_time))
  • Filter: (_6__be_0_node.id = node_id)
  • Rows Removed by Filter: 2
28. 47.400 47.400 ↓ 0.0 0 23,700

Index Scan using _hyper_4_72_chunk_node_cost_vendor_id_end_time_idx on _hyper_4_72_chunk (cost=0.41..2.63 rows=1 width=24) (actual time=0.002..0.002 rows=0 loops=23,700)

  • Index Cond: ((vendor_id = instance_cost.vendor_id) AND (end_time = instance_cost.end_time))
  • Filter: (_6__be_0_node.id = node_id)
  • Rows Removed by Filter: 2
29.          

SubPlan (for Aggregate)

30. 0.000 0.000 ↑ 1.0 1 25,430

Result (cost=0.00..0.01 rows=1 width=32) (actual time=0.000..0.000 rows=1 loops=25,430)

31. 2,148.835 3,560.200 ↑ 1.0 1 12,715

Aggregate (cost=59.95..59.96 rows=1 width=32) (actual time=0.280..0.280 rows=1 loops=12,715)

32. 114.435 1,411.365 ↓ 11.0 22 12,715

Nested Loop (cost=0.15..59.92 rows=2 width=220) (actual time=0.069..0.111 rows=22 loops=12,715)

33. 25.430 25.430 ↓ 4.0 4 12,715

Seq Scan on node _11__be_0_node (cost=0.00..10.34 rows=1 width=4) (actual time=0.001..0.002 rows=4 loops=12,715)

  • Filter: (provider = ANY ('{amazon}'::text[]))
  • Rows Removed by Filter: 2
34. 790.060 1,271.500 ↑ 5.4 5 50,860

Custom Scan (ChunkAppend) on pod_cost (cost=0.15..49.31 rows=27 width=224) (actual time=0.021..0.025 rows=5 loops=50,860)

  • Chunks excluded during runtime: 4
35. 0.000 0.000 ↓ 0.0 0

Index Scan using _hyper_5_3_chunk_pod_cost_pod_id_end_time_idx on _hyper_5_3_chunk (cost=0.15..4.46 rows=1 width=224) (never executed)

  • Index Cond: (end_time = instance_cost.end_time)
  • Filter: ((instance_cost.vendor_id = vendor_id) AND (_11__be_0_node.id = node_id))
36. 0.000 0.000 ↓ 0.0 0

Index Scan using _hyper_5_16_chunk_pod_cost_pod_id_end_time_idx on _hyper_5_16_chunk (cost=0.15..4.46 rows=1 width=224) (never executed)

  • Index Cond: (end_time = instance_cost.end_time)
  • Filter: ((instance_cost.vendor_id = vendor_id) AND (_11__be_0_node.id = node_id))
37. 0.000 0.000 ↓ 0.0 0

Index Scan using _hyper_5_20_chunk_pod_cost_vendor_id_end_time_idx on _hyper_5_20_chunk (cost=0.42..13.28 rows=11 width=224) (never executed)

  • Index Cond: ((vendor_id = instance_cost.vendor_id) AND (end_time = instance_cost.end_time))
  • Filter: (_11__be_0_node.id = node_id)
38. 244.440 244.440 ↑ 2.2 5 27,160

Index Scan using _hyper_5_38_chunk_pod_cost_vendor_id_end_time_idx on _hyper_5_38_chunk (cost=0.42..16.01 rows=11 width=224) (actual time=0.006..0.009 rows=5 loops=27,160)

  • Index Cond: ((vendor_id = instance_cost.vendor_id) AND (end_time = instance_cost.end_time))
  • Filter: (_11__be_0_node.id = node_id)
  • Rows Removed by Filter: 16
39. 237.000 237.000 ↓ 1.7 5 23,700

Index Scan using _hyper_5_73_chunk_pod_cost_vendor_id_end_time_idx on _hyper_5_73_chunk (cost=0.42..11.10 rows=3 width=224) (actual time=0.006..0.010 rows=5 loops=23,700)

  • Index Cond: ((vendor_id = instance_cost.vendor_id) AND (end_time = instance_cost.end_time))
  • Filter: (_11__be_0_node.id = node_id)
  • Rows Removed by Filter: 16
40.          

SubPlan (for Aggregate)

41. 0.000 0.000 ↑ 1.0 1 279,692

Result (cost=0.00..0.01 rows=1 width=32) (actual time=0.000..0.000 rows=1 loops=279,692)

42.          

SubPlan (for Aggregate)

43. 12.715 12.715 ↑ 1.0 1 12,715

Result (cost=0.00..0.01 rows=1 width=32) (actual time=0.001..0.001 rows=1 loops=12,715)

44. 0.013 1.034 ↑ 1.0 1 1

Aggregate (cost=552.70..552.71 rows=1 width=32) (actual time=1.028..1.034 rows=1 loops=1)

45. 0.004 1.019 ↑ 2.0 1 1

Nested Loop Left Join (cost=19.68..552.66 rows=2 width=68) (actual time=0.783..1.019 rows=1 loops=1)

46. 0.005 0.897 ↑ 2.0 1 1

Nested Loop Left Join (cost=3.97..521.18 rows=2 width=36) (actual time=0.663..0.897 rows=1 loops=1)

47. 0.003 0.871 ↑ 2.0 1 1

Nested Loop Semi Join (cost=0.28..513.74 rows=2 width=4) (actual time=0.639..0.871 rows=1 loops=1)

48. 0.016 0.016 ↓ 1.3 4 1

Seq Scan on instance (cost=0.00..1.07 rows=3 width=4) (actual time=0.013..0.016 rows=4 loops=1)

  • Filter: (vendor.id = vendor_id)
  • Rows Removed by Filter: 4
49. 0.008 0.852 ↓ 0.0 0 4

Append (cost=0.28..399.07 rows=9,754 width=4) (actual time=0.212..0.213 rows=0 loops=4)

50. 0.388 0.388 ↓ 0.0 0 4

Index Scan using "111_242_instance_cost_pkey" on _hyper_51_111_chunk _19__be_0_instance_cost (cost=0.28..143.83 rows=2,962 width=4) (actual time=0.097..0.097 rows=0 loops=4)

  • Index Cond: ((instance_id = instance.id) AND (end_time >= '2020-10-03 04:47:15'::timestamp without time zone))
  • Filter: (provider = ANY ('{amazon}'::text[]))
51. 0.456 0.456 ↓ 0.0 0 3

Index Scan using "113_250_instance_cost_pkey" on _hyper_51_113_chunk _19__be_0_instance_cost_1 (cost=0.28..206.48 rows=6,792 width=4) (actual time=0.152..0.152 rows=0 loops=3)

  • Index Cond: ((instance_id = instance.id) AND (end_time >= '2020-10-03 04:47:15'::timestamp without time zone))
  • Filter: (provider = ANY ('{amazon}'::text[]))
52. 0.013 0.021 ↑ 1.0 1 1

Aggregate (cost=3.69..3.70 rows=1 width=32) (actual time=0.020..0.021 rows=1 loops=1)

53. 0.006 0.006 ↓ 2.0 2 1

Index Scan using unique_node on node (cost=0.14..3.67 rows=1 width=4) (actual time=0.005..0.006 rows=2 loops=1)

  • Index Cond: (instance_id = instance.id)
54.          

SubPlan (for Aggregate)

55. 0.002 0.002 ↑ 1.0 1 2

Result (cost=0.00..0.01 rows=1 width=32) (actual time=0.001..0.001 rows=1 loops=2)

56. 0.069 0.118 ↑ 1.0 1 1

Aggregate (cost=15.71..15.72 rows=1 width=32) (actual time=0.117..0.118 rows=1 loops=1)

57. 0.049 0.049 ↑ 1.0 84 1

Seq Scan on pod (cost=0.00..14.39 rows=88 width=4) (actual time=0.008..0.049 rows=84 loops=1)

  • Filter: (instance.id = instance_id)
  • Rows Removed by Filter: 269
58.          

SubPlan (for Aggregate)

59. 0.000 0.000 ↑ 1.0 1 84

Result (cost=0.00..0.01 rows=1 width=32) (actual time=0.000..0.000 rows=1 loops=84)

60.          

SubPlan (for Aggregate)

61. 0.002 0.002 ↑ 1.0 1 1

Result (cost=0.00..0.01 rows=1 width=32) (actual time=0.001..0.002 rows=1 loops=1)

62.          

SubPlan (for Aggregate)

63. 194.240 194.240 ↑ 1.0 1 1

Result (cost=0.00..0.01 rows=1 width=32) (actual time=184.833..194.240 rows=1 loops=1)

Planning time : 4.090 ms
Execution time : 8,448.833 ms