explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Jux8

Settings
# exclusive inclusive rows x rows loops node
1. 2,981.978 6,754.580 ↑ 1.0 1 1

Aggregate (cost=91,071.05..91,071.06 rows=1 width=32) (actual time=6,754.555..6,754.580 rows=1 loops=1)

2. 0.006 3,575.376 ↑ 1.0 1 1

Nested Loop Left Join (cost=91,069.96..91,071.03 rows=1 width=64) (actual time=3,575.345..3,575.376 rows=1 loops=1)

3. 0.004 3,574.275 ↑ 1.0 1 1

Nested Loop Left Join (cost=90,545.28..90,546.32 rows=1 width=36) (actual time=3,574.252..3,574.275 rows=1 loops=1)

4. 0.018 0.018 ↑ 1.0 1 1

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

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

Aggregate (cost=90,545.28..90,545.29 rows=1 width=32) (actual time=3,574.237..3,574.253 rows=1 loops=1)

6. 4.167 3,195.264 ↓ 13.0 12,711 1

Nested Loop Left Join (cost=92.39..90,530.62 rows=977 width=96) (actual time=0.572..3,195.264 rows=12,711 loops=1)

7. 2.198 3,025.854 ↓ 13.0 12,711 1

Nested Loop Left Join (cost=84.83..83,120.08 rows=977 width=76) (actual time=0.543..3,025.854 rows=12,711 loops=1)

8. 12.198 2,718.592 ↓ 13.0 12,711 1

Nested Loop Left Join (cost=61.13..59,933.69 rows=977 width=44) (actual time=0.463..2,718.592 rows=12,711 loops=1)

9. 3.503 11.662 ↓ 13.0 12,711 1

Unique (cost=0.28..444.90 rows=977 width=12) (actual time=0.059..11.662 rows=12,711 loops=1)

10. 1.285 8.159 ↓ 1.3 12,711 1

Custom Scan (ChunkAppend) on instance_cost (cost=0.28..420.48 rows=9,768 width=12) (actual time=0.057..8.159 rows=12,711 loops=1)

  • Order: instance_cost.end_time
  • Chunks excluded during runtime: 0
11. 3.336 3.336 ↑ 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.037..3.336 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.538 3.538 ↓ 2.0 5,921 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..138.66 rows=2,976 width=12) (actual time=0.009..3.538 rows=5,921 loops=1)

  • Index Cond: ((vendor_id = vendor.id) AND (end_time >= '2020-10-03 04:47:15'::timestamp without time zone))
  • Heap Fetches: 3,457
13. 2,148.159 2,694.732 ↑ 1.0 1 12,711

Aggregate (cost=60.85..60.86 rows=1 width=32) (actual time=0.212..0.212 rows=1 loops=12,711)

14. 101.660 546.573 ↑ 2.5 22 12,711

Hash Join (cost=10.82..60.01 rows=56 width=220) (actual time=0.019..0.043 rows=22 loops=12,711)

  • Hash Cond: (pod_cost.node_id = _2__be_0_node.id)
15. 185.613 444.885 ↑ 2.5 22 12,711

Custom Scan (ChunkAppend) on pod_cost (cost=0.15..49.17 rows=56 width=224) (actual time=0.018..0.035 rows=22 loops=12,711)

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

  • Index Cond: ((vendor_id = instance_cost.vendor_id) AND (end_time = instance_cost.end_time))
19. 129.010 129.010 ↑ 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=224) (actual time=0.004..0.019 rows=22 loops=6,790)

  • Index Cond: ((vendor_id = instance_cost.vendor_id) AND (end_time = instance_cost.end_time))
20. 130.262 130.262 ↓ 2.0 22 5,921

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=224) (actual time=0.006..0.022 rows=22 loops=5,921)

  • Index Cond: ((vendor_id = instance_cost.vendor_id) AND (end_time = instance_cost.end_time))
21. 0.006 0.028 ↑ 5.0 6 1

Hash (cost=10.30..10.30 rows=30 width=4) (actual time=0.027..0.028 rows=6 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
22. 0.022 0.022 ↑ 5.0 6 1

Seq Scan on node _2__be_0_node (cost=0.00..10.30 rows=30 width=4) (actual time=0.016..0.022 rows=6 loops=1)

23.          

SubPlan (for Aggregate)

24. 0.000 0.000 ↑ 1.0 1 279,604

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

25. 63.555 305.064 ↑ 1.0 1 12,711

Aggregate (cost=23.70..23.71 rows=1 width=32) (actual time=0.024..0.024 rows=1 loops=12,711)

26. 12.711 241.509 ↑ 3.5 2 12,711

Nested Loop (cost=0.29..23.59 rows=7 width=24) (actual time=0.017..0.019 rows=2 loops=12,711)

27. 159.322 203.376 ↑ 3.5 2 12,711

Custom Scan (ChunkAppend) on node_cost (cost=0.15..13.63 rows=7 width=24) (actual time=0.015..0.016 rows=2 loops=12,711)

  • Chunks excluded during runtime: 4
28. 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))
29. 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))
30. 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=24) (never executed)

  • Index Cond: ((vendor_id = instance_cost.vendor_id) AND (end_time = instance_cost.end_time))
31. 20.370 20.370 ↑ 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=24) (actual time=0.003..0.003 rows=2 loops=6,790)

  • Index Cond: ((vendor_id = instance_cost.vendor_id) AND (end_time = instance_cost.end_time))
32. 23.684 23.684 ↓ 2.0 2 5,921

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.003..0.004 rows=2 loops=5,921)

  • Index Cond: ((vendor_id = instance_cost.vendor_id) AND (end_time = instance_cost.end_time))
33. 25.422 25.422 ↑ 1.0 1 25,422

Index Only Scan using node_pkey on node _7__be_0_node (cost=0.14..1.41 rows=1 width=4) (actual time=0.001..0.001 rows=1 loops=25,422)

  • Index Cond: (id = node_cost.node_id)
  • Heap Fetches: 25,422
34.          

SubPlan (for Aggregate)

35. 0.000 0.000 ↑ 1.0 1 25,422

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

36. 38.133 165.243 ↑ 1.0 1 12,711

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

37. 101.688 127.110 ↑ 3.0 1 12,711

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

  • Chunks excluded during runtime: 2
38. 11.842 11.842 ↑ 1.0 1 5,921

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,921)

  • Index Cond: ((vendor_id = instance_cost.vendor_id) AND (end_time = instance_cost.end_time))
39. 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))
40. 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))
41.          

SubPlan (for Aggregate)

42. 0.000 0.000 ↑ 1.0 1 12,711

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

43.          

SubPlan (for Aggregate)

44. 12.711 12.711 ↑ 1.0 1 12,711

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

45. 0.017 1.095 ↑ 1.0 1 1

Aggregate (cost=524.68..524.69 rows=1 width=32) (actual time=1.089..1.095 rows=1 loops=1)

46. 0.003 1.076 ↑ 2.0 1 1

Nested Loop Left Join (cost=19.68..524.65 rows=2 width=68) (actual time=0.841..1.076 rows=1 loops=1)

47. 0.004 0.925 ↑ 2.0 1 1

Nested Loop Left Join (cost=3.97..493.17 rows=2 width=36) (actual time=0.692..0.925 rows=1 loops=1)

48. 0.002 0.895 ↑ 2.0 1 1

Nested Loop Semi Join (cost=0.28..485.73 rows=2 width=4) (actual time=0.664..0.895 rows=1 loops=1)

49. 0.025 0.025 ↓ 1.3 4 1

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

  • Filter: (vendor.id = vendor_id)
  • Rows Removed by Filter: 4
50. 0.009 0.868 ↓ 0.0 0 4

Append (cost=0.28..371.79 rows=9,768 width=4) (actual time=0.216..0.217 rows=0 loops=4)

51. 0.472 0.472 ↓ 0.0 0 4

Index Only Scan using "111_242_instance_cost_pkey" on _hyper_51_111_chunk _19__be_0_instance_cost (cost=0.28..124.96 rows=2,976 width=4) (actual time=0.118..0.118 rows=0 loops=4)

  • Index Cond: ((instance_id = instance.id) AND (end_time >= '2020-10-03 04:47:15'::timestamp without time zone))
  • Heap Fetches: 1
52. 0.387 0.387 ↓ 0.0 0 3

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

  • Index Cond: ((instance_id = instance.id) AND (end_time >= '2020-10-03 04:47:15'::timestamp without time zone))
  • Heap Fetches: 0
53. 0.019 0.026 ↑ 1.0 1 1

Aggregate (cost=3.69..3.70 rows=1 width=32) (actual time=0.025..0.026 rows=1 loops=1)

54. 0.005 0.005 ↓ 2.0 2 1

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

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

SubPlan (for Aggregate)

56. 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)

57. 0.067 0.148 ↑ 1.0 1 1

Aggregate (cost=15.71..15.72 rows=1 width=32) (actual time=0.146..0.148 rows=1 loops=1)

58. 0.081 0.081 ↑ 1.0 84 1

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

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

SubPlan (for Aggregate)

60. 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)

61.          

SubPlan (for Aggregate)

62. 0.002 0.002 ↑ 1.0 1 1

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

63.          

SubPlan (for Aggregate)

64. 197.226 197.226 ↑ 1.0 1 1

Result (cost=0.00..0.01 rows=1 width=32) (actual time=187.828..197.226 rows=1 loops=1)

Planning time : 11.010 ms
Execution time : 6,827.124 ms