explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 8qbS : Optimization for: plan #8Fi

Settings

Optimization path:

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

Unique (cost=947.89..948.71 rows=30 width=615) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Sort (cost=947.89..947.96 rows=30 width=615) (actual rows= loops=)

  • Sort Key: mg.id, mg.description, mg.hidden, mg.name, mg.ordinal, mg.virtual, mg.structure_id, mg.domain, mg.token, mg.note
3. 0.000 0.000 ↓ 0.0

Hash Right Join (cost=900.84..947.15 rows=30 width=615) (actual rows= loops=)

  • Hash Cond: (o.metadatum_id = m.id)
4. 0.000 0.000 ↓ 0.0

Seq Scan on occurrence o (cost=0.00..38.92 rows=1,892 width=8) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

Hash (cost=900.60..900.60 rows=19 width=623) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=31.09..900.60 rows=19 width=623) (actual rows= loops=)

  • Join Filter: (m.id = p.metadatum_id)
7. 0.000 0.000 ↓ 0.0

Hash Join (cost=31.09..512.54 rows=10 width=631) (actual rows= loops=)

  • Hash Cond: (p.metadatum_id = m.id)
8. 0.000 0.000 ↓ 0.0

Seq Scan on permission p (cost=0.00..479.07 rows=605 width=8) (actual rows= loops=)

  • Filter: ((internal IS NOT NULL) AND ((context)::text = 'STORE'::text) AND (role = 1))
9. 0.000 0.000 ↓ 0.0

Hash (cost=30.84..30.84 rows=20 width=623) (actual rows= loops=)

10. 0.000 0.000 ↓ 0.0

Hash Right Join (cost=14.30..30.84 rows=20 width=623) (actual rows= loops=)

  • Hash Cond: (r.metadatum_id = m.id)
11. 0.000 0.000 ↓ 0.0

Seq Scan on restriction r (cost=0.00..14.98 rows=398 width=8) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

Hash (cost=14.05..14.05 rows=20 width=623) (actual rows= loops=)

13. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.55..14.05 rows=20 width=623) (actual rows= loops=)

14. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.27..10.13 rows=4 width=615) (actual rows= loops=)

15. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.00..4.41 rows=1 width=8) (actual rows= loops=)

  • Join Filter: (a.id = s.archivalitemtype_id)
16. 0.000 0.000 ↓ 0.0

Seq Scan on archivalitemtype a (cost=0.00..2.62 rows=1 width=8) (actual rows= loops=)

  • Filter: ((token)::text = 'notaryDeed'::text)
17. 0.000 0.000 ↓ 0.0

Seq Scan on structure s (cost=0.00..1.71 rows=6 width=16) (actual rows= loops=)

  • Filter: (version = '2'::real)
18. 0.000 0.000 ↓ 0.0

Index Scan using uk_8x6mhlo4i0khw6e180laxrapu on metadatagroup mg (cost=0.27..5.67 rows=4 width=615) (actual rows= loops=)

  • Index Cond: (structure_id = s.id)
  • Filter: (NOT virtual)
19. 0.000 0.000 ↓ 0.0

Index Scan using uk_9ulqowfhvdctagho9ap4gaip5 on metadatum m (cost=0.28..0.93 rows=5 width=16) (actual rows= loops=)

  • Index Cond: (metadatagroup_id = mg.id)
20. 0.000 0.000 ↓ 0.0

Materialize (cost=0.00..53.98 rows=2,265 width=0) (actual rows= loops=)

21. 0.000 0.000 ↓ 0.0

Seq Scan on proposal pr (cost=0.00..42.65 rows=2,265 width=0) (actual rows= loops=)