explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 3cWE

Settings
# exclusive inclusive rows x rows loops node
1. 3,473.608 13,394.118 ↑ 1.0 1 1

Aggregate (cost=447,636.08..447,636.09 rows=1 width=32) (actual time=13,394.105..13,394.118 rows=1 loops=1)

  • Buffers: shared hit=1,133,636
  • Functions: 88
  • Options: Inlining false, Optimization false, Expressions true, Deforming true
  • Timing: Generation 5.503 ms, Inlining 0.000 ms, Optimization 1.299 ms, Emission 29.289 ms, Total 36.091 ms
2. 0.008 9,696.390 ↑ 1.0 1 1

Nested Loop Left Join (cost=447,635.02..447,636.06 rows=1 width=32) (actual time=9,696.373..9,696.390 rows=1 loops=1)

  • Buffers: shared hit=1,133,636
3. 31.098 31.098 ↑ 1.0 1 1

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

  • Filter: (id = 1)
  • Rows Removed by Filter: 3
  • Buffers: shared hit=1
4. 1,465.240 9,665.284 ↑ 1.0 1 1

Aggregate (cost=447,635.02..447,635.03 rows=1 width=32) (actual time=9,665.274..9,665.284 rows=1 loops=1)

  • Buffers: shared hit=1,133,635
5. 10.297 7,981.876 ↓ 4.0 4 1

Nested Loop Left Join (cost=447,632.75..447,635.00 rows=1 width=32) (actual time=19.481..7,981.876 rows=4 loops=1)

  • Buffers: shared hit=1,133,635
6. 0.027 0.027 ↓ 4.0 4 1

Index Scan using unique_node on node (cost=0.14..2.36 rows=1 width=4) (actual time=0.014..0.027 rows=4 loops=1)

  • Index Cond: (vendor_id = vendor.id)
  • Buffers: shared hit=2
7. 2,339.692 7,971.552 ↑ 1.0 1 4

Aggregate (cost=447,632.62..447,632.63 rows=1 width=32) (actual time=1,992.886..1,992.888 rows=1 loops=4)

  • Buffers: shared hit=1,133,633
8. 448.192 5,350.584 ↑ 1.5 70,319 4

Nested Loop Left Join (cost=2.80..446,005.94 rows=108,445 width=252) (actual time=8.154..1,337.646 rows=70,319 loops=4)

  • Buffers: shared hit=1,133,633
9. 29.404 401.976 ↑ 1.5 70,319 4

Custom Scan (ChunkAppend) on pod_cost (cost=0.42..58,653.95 rows=108,445 width=220) (actual time=8.123..100.494 rows=70,319 loops=4)

  • Buffers: shared hit=289,805
10. 189.752 189.752 ↑ 2.0 37,974 4

Index Scan using "38_239_pod_cost_pkey" on _hyper_5_38_chunk (cost=0.42..26,143.33 rows=75,977 width=220) (actual time=2.998..47.438 rows=37,974 loops=4)

  • Index Cond: ((node_id = node.id) AND (end_time >= '2020-10-03 04:47:15'::timestamp without time zone))
  • Buffers: shared hit=142,397
11. 182.820 182.820 ↑ 1.0 32,346 4

Index Scan using "73_240_pod_cost_pkey" on _hyper_5_73_chunk (cost=0.42..32,510.62 rows=32,468 width=220) (actual time=6.398..45.705 rows=32,346 loops=4)

  • Index Cond: ((node_id = node.id) AND (end_time >= '2020-10-03 04:47:15'::timestamp without time zone))
  • Buffers: shared hit=147,408
12. 1,406.380 4,500.416 ↑ 1.0 1 281,276

Hash Right Join (cost=2.38..3.55 rows=1 width=32) (actual time=0.009..0.016 rows=1 loops=281,276)

  • Hash Cond: (instance.id = pod.instance_id)
  • Buffers: shared hit=843,828
13. 2,531.484 2,531.484 ↓ 1.3 8 281,276

Seq Scan on instance (cost=0.00..1.14 rows=6 width=36) (actual time=0.002..0.009 rows=8 loops=281,276)

  • Buffers: shared hit=281,276
14.          

SubPlan (for Seq Scan)

15. 0.000 0.000 ↑ 1.0 1 2,250,208

Result (cost=0.00..0.01 rows=1 width=32) (actual time=0.000..0.000 rows=1 loops=2,250,208)

16. 281.276 562.552 ↑ 1.0 1 281,276

Hash (cost=2.37..2.37 rows=1 width=49) (actual time=0.002..0.002 rows=1 loops=281,276)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=562,552
17. 281.276 281.276 ↑ 1.0 1 281,276

Index Scan using pod_pkey on pod (cost=0.15..2.37 rows=1 width=49) (actual time=0.001..0.001 rows=1 loops=281,276)

  • Index Cond: (id = pod_cost.pod_id)
  • Buffers: shared hit=562,552
18.          

SubPlan (for Hash Right Join)

19. 0.000 0.000 ↑ 1.0 1 281,276

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

20.          

SubPlan (for Aggregate)

21. 281.276 281.276 ↑ 1.0 1 281,276

Result (cost=0.00..0.01 rows=1 width=32) (actual time=0.000..0.001 rows=1 loops=281,276)

22.          

SubPlan (for Aggregate)

23. 218.168 218.168 ↑ 1.0 1 4

Result (cost=0.00..0.01 rows=1 width=32) (actual time=51.793..54.542 rows=1 loops=4)

24.          

SubPlan (for Aggregate)

25. 224.120 224.120 ↑ 1.0 1 1

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

Planning time : 5.580 ms
Execution time : 13,552.285 ms