explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Of8q

Settings
# exclusive inclusive rows x rows loops node
1. 2,970.452 6,741.267 ↑ 1.0 1 1

Aggregate (cost=83,873.52..83,873.53 rows=1 width=32) (actual time=6,741.247..6,741.267 rows=1 loops=1)

2. 0.008 3,575.696 ↑ 1.0 1 1

Nested Loop Left Join (cost=83,872.43..83,873.50 rows=1 width=64) (actual time=3,575.670..3,575.696 rows=1 loops=1)

3. 0.009 3,444.106 ↑ 1.0 1 1

Nested Loop Left Join (cost=70,129.16..70,130.20 rows=1 width=36) (actual time=3,444.085..3,444.106 rows=1 loops=1)

4. 0.014 0.014 ↑ 1.0 1 1

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

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

Aggregate (cost=70,129.16..70,129.17 rows=1 width=32) (actual time=3,444.070..3,444.083 rows=1 loops=1)

6. 7.804 3,044.469 ↓ 13.0 12,698 1

Nested Loop Left Join (cost=71.59..70,114.52 rows=976 width=104) (actual time=1.108..3,044.469 rows=12,698 loops=1)

7. 10.347 458.971 ↓ 13.0 12,698 1

Nested Loop Left Join (cost=21.57..21,269.53 rows=976 width=76) (actual time=0.864..458.971 rows=12,698 loops=1)

8. 6.440 283.550 ↓ 13.0 12,698 1

Nested Loop Left Join (cost=14.02..13,866.57 rows=976 width=44) (actual time=0.822..283.550 rows=12,698 loops=1)

9. 3.702 10.452 ↓ 13.0 12,698 1

Unique (cost=0.28..422.17 rows=976 width=12) (actual time=0.025..10.452 rows=12,698 loops=1)

10. 1.294 6.750 ↓ 1.3 12,698 1

Custom Scan (ChunkAppend) on instance_cost (cost=0.28..397.77 rows=9,760 width=12) (actual time=0.022..6.750 rows=12,698 loops=1)

  • Order: instance_cost.end_time
  • Chunks excluded during runtime: 0
11. 3.093 3.093 ↑ 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.010..3.093 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. 2.363 2.363 ↓ 2.0 5,908 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..115.95 rows=2,968 width=12) (actual time=0.010..2.363 rows=5,908 loops=1)

  • Index Cond: ((vendor_id = vendor.id) AND (end_time >= '2020-10-03 04:47:15'::timestamp without time zone))
  • Heap Fetches: 2,029
13. 50.792 266.658 ↑ 1.0 1 12,698

Aggregate (cost=13.74..13.75 rows=1 width=32) (actual time=0.021..0.021 rows=1 loops=12,698)

14. 158.284 215.866 ↑ 3.5 2 12,698

Custom Scan (ChunkAppend) on node_cost (cost=0.15..13.63 rows=7 width=16) (actual time=0.016..0.017 rows=2 loops=12,698)

  • Chunks excluded during runtime: 4
15. 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=16) (never executed)

  • Index Cond: ((vendor_id = instance_cost.vendor_id) AND (end_time = instance_cost.end_time))
16. 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=16) (never executed)

  • Index Cond: ((vendor_id = instance_cost.vendor_id) AND (end_time = instance_cost.end_time))
17. 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.13 rows=2 width=16) (never executed)

  • Index Cond: ((vendor_id = instance_cost.vendor_id) AND (end_time = instance_cost.end_time))
18. 33.950 33.950 ↑ 1.0 2 6,790

Index Scan using _hyper_4_37_chunk_node_cost_vendor_id_end_time_idx on _hyper_4_37_chunk (cost=0.41..3.13 rows=2 width=16) (actual time=0.004..0.005 rows=2 loops=6,790)

  • Index Cond: ((vendor_id = instance_cost.vendor_id) AND (end_time = instance_cost.end_time))
19. 23.632 23.632 ↓ 2.0 2 5,908

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=16) (actual time=0.003..0.004 rows=2 loops=5,908)

  • Index Cond: ((vendor_id = instance_cost.vendor_id) AND (end_time = instance_cost.end_time))
20.          

SubPlan (for Aggregate)

21. 0.000 0.000 ↑ 1.0 1 25,396

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

22. 38.094 165.074 ↑ 1.0 1 12,698

Aggregate (cost=7.55..7.56 rows=1 width=32) (actual time=0.013..0.013 rows=1 loops=12,698)

23. 101.584 126.980 ↑ 3.0 1 12,698

Custom Scan (ChunkAppend) on instance_cost instance_cost_1 (cost=0.28..7.51 rows=3 width=36) (actual time=0.010..0.010 rows=1 loops=12,698)

  • Chunks excluded during runtime: 2
24. 11.816 11.816 ↑ 1.0 1 5,908

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=36) (actual time=0.002..0.002 rows=1 loops=5,908)

  • Index Cond: ((vendor_id = instance_cost.vendor_id) AND (end_time = instance_cost.end_time))
25. 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=36) (never executed)

  • Index Cond: ((vendor_id = instance_cost.vendor_id) AND (end_time = instance_cost.end_time))
26. 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=36) (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))
27.          

SubPlan (for Aggregate)

28. 0.000 0.000 ↑ 1.0 1 12,698

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

29. 2,171.358 2,577.694 ↑ 1.0 1 12,698

Aggregate (cost=50.02..50.03 rows=1 width=32) (actual time=0.203..0.203 rows=1 loops=12,698)

30. 184.562 406.336 ↑ 2.5 22 12,698

Custom Scan (ChunkAppend) on pod_cost (cost=0.15..49.17 rows=56 width=220) (actual time=0.017..0.032 rows=22 loops=12,698)

  • Chunks excluded during runtime: 4
31. 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=220) (never executed)

  • Index Cond: (end_time = instance_cost.end_time)
  • Filter: (instance_cost.vendor_id = vendor_id)
32. 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=220) (never executed)

  • Index Cond: (end_time = instance_cost.end_time)
  • Filter: (instance_cost.vendor_id = vendor_id)
33. 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.23 rows=21 width=220) (never executed)

  • Index Cond: ((vendor_id = instance_cost.vendor_id) AND (end_time = instance_cost.end_time))
34. 115.430 115.430 ↑ 1.0 22 6,790

Index Scan using _hyper_5_38_chunk_pod_cost_vendor_id_end_time_idx on _hyper_5_38_chunk (cost=0.42..15.95 rows=22 width=220) (actual time=0.004..0.017 rows=22 loops=6,790)

  • Index Cond: ((vendor_id = instance_cost.vendor_id) AND (end_time = instance_cost.end_time))
35. 106.344 106.344 ↓ 2.0 22 5,908

Index Scan using _hyper_5_73_chunk_pod_cost_vendor_id_end_time_idx on _hyper_5_73_chunk (cost=0.42..11.07 rows=11 width=220) (actual time=0.004..0.018 rows=22 loops=5,908)

  • Index Cond: ((vendor_id = instance_cost.vendor_id) AND (end_time = instance_cost.end_time))
36.          

SubPlan (for Aggregate)

37. 0.000 0.000 ↑ 1.0 1 279,318

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

38.          

SubPlan (for Aggregate)

39. 12.698 12.698 ↑ 1.0 1 12,698

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

40. 0.143 131.582 ↑ 1.0 1 1

Aggregate (cost=13,743.27..13,743.28 rows=1 width=32) (actual time=131.578..131.582 rows=1 loops=1)

41. 0.047 131.439 ↑ 2.2 80 1

Hash Join (cost=13,723.36..13,740.63 rows=176 width=45) (actual time=131.348..131.439 rows=80 loops=1)

  • Hash Cond: (pod.id = _17__be_0_pod_cost.pod_id)
42. 0.082 0.082 ↑ 1.1 329 1

Seq Scan on pod (cost=0.00..14.39 rows=351 width=45) (actual time=0.021..0.082 rows=329 loops=1)

  • Filter: (vendor.id = vendor_id)
  • Rows Removed by Filter: 24
43. 0.018 131.310 ↑ 1.9 104 1

Hash (cost=13,720.86..13,720.86 rows=200 width=4) (actual time=131.308..131.310 rows=104 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 12kB
44. 31.688 131.292 ↑ 1.9 104 1

HashAggregate (cost=13,718.86..13,720.86 rows=200 width=4) (actual time=131.276..131.292 rows=104 loops=1)

  • Group Key: _17__be_0_pod_cost.pod_id
45. 19.435 99.604 ↑ 1.0 283,483 1

Append (cost=0.42..13,010.01 rows=283,542 width=4) (actual time=1.834..99.604 rows=283,483 loops=1)

46. 31.488 31.488 ↑ 1.0 151,894 1

Index Only Scan using _hyper_5_38_chunk_pod_cost_pod_id_end_time_idx on _hyper_5_38_chunk _17__be_0_pod_cost (cost=0.42..4,564.70 rows=151,953 width=4) (actual time=1.833..31.488 rows=151,894 loops=1)

  • Index Cond: (end_time >= '2020-10-03 04:47:15'::timestamp without time zone)
  • Heap Fetches: 14,284
47. 48.681 48.681 ↑ 1.0 131,589 1

Index Only Scan using _hyper_5_73_chunk_pod_cost_pod_id_end_time_idx on _hyper_5_73_chunk _17__be_0_pod_cost_1 (cost=0.42..7,027.59 rows=131,589 width=4) (actual time=0.025..48.681 rows=131,589 loops=1)

  • Index Cond: (end_time >= '2020-10-03 04:47:15'::timestamp without time zone)
  • Heap Fetches: 65,643
48.          

SubPlan (for Aggregate)

49. 0.000 0.000 ↑ 1.0 1 80

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

50.          

SubPlan (for Aggregate)

51. 195.119 195.119 ↑ 1.0 1 1

Result (cost=0.00..0.01 rows=1 width=32) (actual time=185.632..195.119 rows=1 loops=1)

Planning time : 4.352 ms
Execution time : 6,815.843 ms