explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 1mTH

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

Update on boi_rel (cost=857.61..865.63 rows=1 width=130) (actual rows= loops=)

2.          

Initplan (forUpdate)

3. 0.000 0.000 ↓ 0.0

Aggregate (cost=857.18..857.19 rows=1 width=32) (actual rows= loops=)

4.          

CTE r

5. 0.000 0.000 ↓ 0.0

Recursive Union (cost=0.42..856.44 rows=11 width=37) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Index Scan using boi_rel_pkey on boi_rel rel (cost=0.42..8.44 rows=1 width=37) (actual rows= loops=)

  • Index Cond: (id = 176)
  • Filter: (NOT is_deleted)
7. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.42..84.78 rows=1 width=37) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

WorkTable Scan on r (cost=0.00..0.20 rows=10 width=36) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

Index Scan using idx_boi_rel_to_boi_id on boi_rel rel2 (cost=0.42..8.45 rows=1 width=33) (actual rows= loops=)

  • Index Cond: (to_bo_instance_id = r.from_id)
  • Filter: ((NOT is_deleted) AND (from_bo_instance_id <> r.to_id) AND (id <> r.id) AND (r.rel_type_id = boc_rel_type_id))
10. 0.000 0.000 ↓ 0.0

Sort (cost=0.58..0.60 rows=11 width=12) (actual rows= loops=)

  • Sort Key: (max(r_1.level))
11. 0.000 0.000 ↓ 0.0

HashAggregate (cost=0.28..0.39 rows=11 width=12) (actual rows= loops=)

  • Group Key: r_1.from_id
12. 0.000 0.000 ↓ 0.0

CTE Scan on r r_1 (cost=0.00..0.22 rows=11 width=12) (actual rows= loops=)

13. 0.000 0.000 ↓ 0.0

Index Scan using boi_rel_pkey on boi_rel (cost=0.42..8.44 rows=1 width=130) (actual rows= loops=)

  • Index Cond: (id = 176)