explain.depesz.com

PostgreSQL's explain analyze made readable

Result: lAm4

Settings
# exclusive inclusive rows x rows loops node
1. 2,934.827 6,400.225 ↑ 1.0 1 1

Aggregate (cost=151,496.87..151,496.88 rows=1 width=32) (actual time=6,400.212..6,400.225 rows=1 loops=1)

  • Functions: 116
  • Options: Inlining false, Optimization false, Expressions true, Deforming true
  • Timing: Generation 7.482 ms, Inlining 0.000 ms, Optimization 2.771 ms, Emission 43.267 ms, Total 53.520 ms
2. 0.006 3,274.897 ↑ 1.0 1 1

Nested Loop Left Join (cost=151,495.81..151,496.85 rows=1 width=32) (actual time=3,274.881..3,274.897 rows=1 loops=1)

3. 46.936 46.936 ↑ 1.0 1 1

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

  • Filter: (id = 1)
  • Rows Removed by Filter: 3
4. 354.735 3,227.955 ↑ 1.0 1 1

Aggregate (cost=151,495.81..151,495.82 rows=1 width=32) (actual time=3,227.944..3,227.955 rows=1 loops=1)

5. 7.517 2,860.532 ↓ 13.0 12,688 1

Nested Loop Left Join (cost=155.01..151,481.17 rows=976 width=32) (actual time=0.346..2,860.532 rows=12,688 loops=1)

6. 3.689 10.903 ↓ 13.0 12,688 1

Unique (cost=0.28..432.34 rows=976 width=12) (actual time=0.035..10.903 rows=12,688 loops=1)

7. 1.323 7.214 ↓ 1.3 12,688 1

Custom Scan (ChunkAppend) on instance_cost (cost=0.28..407.95 rows=9,756 width=12) (actual time=0.031..7.214 rows=12,688 loops=1)

  • Order: instance_cost.end_time
  • Chunks excluded during runtime: 0
8. 3.117 3.117 ↑ 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..3.117 rows=6,790 loops=1)

  • Index Cond: (end_time >= '2020-10-03 04:47:15'::timestamp without time zone)
  • Filter: (vendor.id = vendor_id)
9. 2.774 2.774 ↓ 2.0 5,898 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..126.13 rows=2,964 width=12) (actual time=0.012..2.774 rows=5,898 loops=1)

  • Index Cond: ((vendor_id = vendor.id) AND (end_time >= '2020-10-03 04:47:15'::timestamp without time zone))
  • Heap Fetches: 2,383
10. 101.504 2,842.112 ↑ 1.0 1 12,688

Aggregate (cost=154.72..154.73 rows=1 width=32) (actual time=0.224..0.224 rows=1 loops=12,688)

11. 12.688 2,727.920 ↑ 3.0 1 12,688

Nested Loop Left Join (cost=49.31..154.68 rows=3 width=40) (actual time=0.215..0.215 rows=1 loops=12,688)

12. 114.192 139.568 ↑ 3.0 1 12,688

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

  • Chunks excluded during runtime: 2
13. 11.796 11.796 ↑ 1.0 1 5,898

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

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

  • Index Cond: ((vendor_id = instance_cost.vendor_id) AND (end_time = instance_cost.end_time))
15. 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=16) (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))
16. 2,144.272 2,575.664 ↑ 1.0 1 12,688

Aggregate (cost=49.03..49.04 rows=1 width=32) (actual time=0.203..0.203 rows=1 loops=12,688)

17. 222.486 431.392 ↑ 2.5 22 12,688

Custom Scan (ChunkAppend) on pod_cost (cost=0.15..48.21 rows=54 width=220) (actual time=0.019..0.034 rows=22 loops=12,688)

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

Index Scan using "3_236_pod_cost_pkey" on _hyper_5_3_chunk (cost=0.15..2.37 rows=1 width=220) (never executed)

  • Index Cond: ((vendor_id = instance_cost_1.vendor_id) AND (instance_id = instance_cost_1.instance_id) AND (end_time = instance_cost_1.end_time))
19. 0.000 0.000 ↓ 0.0 0

Index Scan using "16_237_pod_cost_pkey" on _hyper_5_16_chunk (cost=0.15..2.37 rows=1 width=220) (never executed)

  • Index Cond: ((vendor_id = instance_cost_1.vendor_id) AND (instance_id = instance_cost_1.instance_id) AND (end_time = instance_cost_1.end_time))
20. 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=21 width=220) (never executed)

  • Index Cond: ((vendor_id = instance_cost_1.vendor_id) AND (end_time = instance_cost_1.end_time))
  • Filter: (instance_cost_1.instance_id = instance_id)
21. 108.640 108.640 ↑ 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..16.01 rows=22 width=220) (actual time=0.004..0.016 rows=22 loops=6,790)

  • Index Cond: ((vendor_id = instance_cost_1.vendor_id) AND (end_time = instance_cost_1.end_time))
  • Filter: (instance_cost_1.instance_id = instance_id)
22. 100.266 100.266 ↓ 2.4 22 5,898

Index Scan using _hyper_5_73_chunk_pod_cost_vendor_id_end_time_idx on _hyper_5_73_chunk (cost=0.42..14.19 rows=9 width=220) (actual time=0.004..0.017 rows=22 loops=5,898)

  • Index Cond: ((vendor_id = instance_cost_1.vendor_id) AND (end_time = instance_cost_1.end_time))
  • Filter: (instance_cost_1.instance_id = instance_id)
23.          

SubPlan (for Aggregate)

24. 0.000 0.000 ↑ 1.0 1 279,098

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

25.          

SubPlan (for Aggregate)

26. 12.688 12.688 ↑ 1.0 1 12,688

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

27.          

SubPlan (for Aggregate)

28. 12.688 12.688 ↑ 1.0 1 12,688

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

29.          

SubPlan (for Aggregate)

30. 190.501 190.501 ↑ 1.0 1 1

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

Planning time : 1.732 ms
Execution time : 6,480.689 ms