explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 1bUE : Optimization for: plan #uYcJO

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.561 1.301 ↓ 3.4 1,975 1

Nested Loop (cost=2.03..67.31 rows=580 width=3,369) (actual time=0.054..1.301 rows=1,975 loops=1)

2. 0.022 0.062 ↓ 1.5 3 1

Hash Join (cost=1.75..5.28 rows=2 width=2,707) (actual time=0.045..0.062 rows=3 loops=1)

  • Hash Cond: (hl.hierarchy_id = h.id)
3. 0.017 0.017 ↑ 1.0 120 1

Seq Scan on hierarchylevel hl (cost=0.00..3.20 rows=120 width=79) (actual time=0.011..0.017 rows=120 loops=1)

4. 0.008 0.023 ↑ 1.0 1 1

Hash (cost=1.73..1.73 rows=1 width=2,628) (actual time=0.023..0.023 rows=1 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
5. 0.015 0.015 ↑ 1.0 1 1

Seq Scan on hierarchy h (cost=0.00..1.73 rows=1 width=2,628) (actual time=0.011..0.015 rows=1 loops=1)

  • Filter: (((type_)::text = 'CUSTOMER'::text) AND ((code)::text = 'CGREG01'::text))
  • Rows Removed by Filter: 48
6. 0.678 0.678 ↓ 2.7 658 3

Index Scan using uk_j6ixn4c57uvd3jma259vea35e on hierarchyvalue hv (cost=0.29..28.60 rows=241 width=662) (actual time=0.005..0.226 rows=658 loops=3)

  • Index Cond: (hierarchylevel_id = hl.id)