explain.depesz.com

PostgreSQL's explain analyze made readable

Result: t6ik

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Nested Loop (cost=169.86..484.65 rows=577 width=666) (actual rows= loops=)

  • -> Index Scan using hierarchyvalue_pkey on hierarchyvalue hv (cost=0.29..0.34 rows=1 width=662)" Index Cond: (id = hv_closuretable.descendant_id)
2. 0.000 0.000 ↓ 0.0

Nested Loop (cost=169.58..285.96 rows=577 width=4) (actual rows= loops=)

3. 0.000 0.000 ↓ 0.0

HashAggregate (cost=169.28..171.65 rows=237 width=8) (actual rows= loops=)

  • Group Key: hv_1.id
4. 0.000 0.000 ↓ 0.0

Nested Loop (cost=11.16..168.69 rows=237 width=8) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

Hash Join (cost=1.63..5.16 rows=1 width=8) (actual rows= loops=)

  • Hash Cond: (hl.hierarchy_id = h.id)
6. 0.000 0.000 ↓ 0.0

Seq Scan on hierarchylevel hl (cost=0.00..3.50 rows=13 width=16) (actual rows= loops=)

  • Filter: (level_ = 2)
7. 0.000 0.000 ↓ 0.0

Hash (cost=1.61..1.61 rows=1 width=8) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Seq Scan on hierarchy h (cost=0.00..1.61 rows=1 width=8) (actual rows= loops=)

  • Filter: ((code)::text = '001'::text)
9. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on hierarchyvalue hv_1 (cost=9.54..161.12 rows=241 width=16) (actual rows= loops=)

  • Recheck Cond: (hierarchylevel_id = hl.id)
10. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on uk_j6ixn4c57uvd3jma259vea35e (cost=0.00..9.48 rows=241 width=0) (actual rows= loops=)

  • Index Cond: (hierarchylevel_id = hl.id)
11. 0.000 0.000 ↓ 0.0

Index Scan using hv_closuretable_ancestor_id_index on hv_closuretable (cost=0.29..0.44 rows=4 width=8) (actual rows= loops=)

  • Index Cond: (ancestor_id = hv_1.id)