explain.depesz.com

PostgreSQL's explain analyze made readable

Result: sI7iX

Settings

Optimization(s) for this plan:

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

Limit (cost=10,694.53..10,694.58 rows=20 width=1,216) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Sort (cost=10,694.53..10,695.23 rows=283 width=1,216) (actual rows= loops=)

  • Sort Key: (nlevel(t.ppath))
3. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.00..10,687.00 rows=283 width=1,216) (actual rows= loops=)

  • Join Filter: (n.long_paths ~ (ltree2text(t.ppath))::lquery)
4. 0.000 0.000 ↓ 0.0

Seq Scan on node n (cost=0.00..144.60 rows=1,452 width=1,212) (actual rows= loops=)

  • Filter: (NOT deleted)
5. 0.000 0.000 ↓ 0.0

Materialize (cost=0.00..4,171.53 rows=195 width=32) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Subquery Scan on t (cost=0.00..4,170.55 rows=195 width=32) (actual rows= loops=)

  • Filter: ((t.ppath <@ 'df3108a6495445189caaf8c8859e15ca'::ltree) OR ((nlevel(t.ppath) > 1) AND (subpath(t.ppath, 1) <@ 'df3108a6495445189caaf8c8859e15ca'::ltree)))
7. 0.000 0.000 ↓ 0.0

ProjectSet (cost=0.00..885.55 rows=146,000 width=48) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Seq Scan on node (cost=0.00..144.60 rows=1,460 width=253) (actual rows= loops=)