explain.depesz.com

PostgreSQL's explain analyze made readable

Result: oJCv

Settings
# exclusive inclusive rows x rows loops node
1. 507.732 2,450.002 ↑ 1.0 1 1

Aggregate (cost=1,033,122.48..1,033,122.50 rows=1 width=32) (actual time=2,449.991..2,450.002 rows=1 loops=1)

  • Functions: 74
  • Options: Inlining true, Optimization true, Expressions true, Deforming true
  • Timing: Generation 7.866 ms, Inlining 88.173 ms, Optimization 171.196 ms, Emission 125.320 ms, Total 392.554 ms
2. 0.011 1,908.253 ↑ 1.0 1 1

Nested Loop Left Join (cost=1,033,121.42..1,033,122.47 rows=1 width=32) (actual time=1,908.236..1,908.253 rows=1 loops=1)

3. 385.350 385.350 ↑ 1.0 1 1

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

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

Aggregate (cost=1,033,121.42..1,033,121.43 rows=1 width=32) (actual time=1,522.883..1,522.892 rows=1 loops=1)

5. 36.850 1,375.035 ↓ 1.2 21,290 1

Nested Loop Left Join (cost=60.02..1,032,905.57 rows=17,268 width=40) (actual time=0.289..1,375.035 rows=21,290 loops=1)

6. 2.011 18.205 ↓ 1.2 21,290 1

Custom Scan (ChunkAppend) on cost_end_time (cost=0.28..541.73 rows=17,268 width=12) (actual time=0.052..18.205 rows=21,290 loops=1)

  • Order: cost_end_time.end_time
  • Chunks excluded during runtime: 0
7. 4.412 4.412 ↑ 1.0 5,686 1

Index Scan Backward using _hyper_84_148_chunk_cost_end_time_end_time_idx on _hyper_84_148_chunk (cost=0.28..171.20 rows=5,686 width=12) (actual time=0.020..4.412 rows=5,686 loops=1)

  • Index Cond: (end_time >= '2020-09-01 04:47:15'::timestamp without time zone)
  • Filter: (vendor.id = vendor_id)
8. 5.897 5.897 ↑ 1.0 7,552 1

Index Scan Backward using _hyper_84_149_chunk_cost_end_time_end_time_idx on _hyper_84_149_chunk (cost=0.28..231.62 rows=7,552 width=12) (actual time=0.024..5.897 rows=7,552 loops=1)

  • Index Cond: (end_time >= '2020-09-01 04:47:15'::timestamp without time zone)
  • Filter: (vendor.id = vendor_id)
9. 5.885 5.885 ↓ 2.0 8,052 1

Index Only Scan using "147_304_cost_end_time_pkey" on _hyper_84_147_chunk (cost=0.28..138.90 rows=4,030 width=12) (actual time=0.056..5.885 rows=8,052 loops=1)

  • Index Cond: ((vendor_id = vendor.id) AND (end_time >= '2020-09-01 04:47:15'::timestamp without time zone))
  • Heap Fetches: 8,052
10. 596.120 1,319.980 ↑ 1.0 1 21,290

Aggregate (cost=59.74..59.75 rows=1 width=32) (actual time=0.062..0.062 rows=1 loops=21,290)

11. 85.122 723.860 ↑ 2.5 22 21,290

Hash Join (cost=10.82..58.90 rows=56 width=20) (actual time=0.018..0.034 rows=22 loops=21,290)

  • Hash Cond: (pod_cost.node_id = _2__be_0_node.id)
12. 322.170 638.700 ↑ 2.5 22 21,290

Custom Scan (ChunkAppend) on pod_cost (cost=0.15..48.07 rows=56 width=24) (actual time=0.017..0.030 rows=22 loops=21,290)

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

  • Index Cond: (end_time = cost_end_time.end_time)
  • Filter: (cost_end_time.vendor_id = vendor_id)
14. 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=24) (never executed)

  • Index Cond: (end_time = cost_end_time.end_time)
  • Filter: (cost_end_time.vendor_id = vendor_id)
15. 73.918 73.918 ↑ 1.0 21 5,686

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=24) (actual time=0.004..0.013 rows=21 loops=5,686)

  • Index Cond: ((vendor_id = cost_end_time.vendor_id) AND (end_time = cost_end_time.end_time))
16. 105.728 105.728 ↑ 1.0 22 7,552

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=24) (actual time=0.004..0.014 rows=22 loops=7,552)

  • Index Cond: ((vendor_id = cost_end_time.vendor_id) AND (end_time = cost_end_time.end_time))
17. 136.884 136.884 ↓ 2.0 22 8,052

Index Scan using _hyper_5_73_chunk_pod_cost_vendor_id_end_time_idx on _hyper_5_73_chunk (cost=0.42..9.97 rows=11 width=24) (actual time=0.006..0.017 rows=22 loops=8,052)

  • Index Cond: ((vendor_id = cost_end_time.vendor_id) AND (end_time = cost_end_time.end_time))
18. 0.004 0.038 ↑ 5.0 6 1

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

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
19. 0.034 0.034 ↑ 5.0 6 1

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

20.          

SubPlan (for Aggregate)

21. 0.000 0.000 ↑ 1.0 1 463,268

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

22.          

SubPlan (for Nested Loop Left Join)

23. 0.000 0.000 ↑ 1.0 1 21,290

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

24.          

SubPlan (for Aggregate)

25. 34.017 34.017 ↑ 1.0 1 1

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

Planning time : 8.177 ms
Execution time : 2,519.867 ms