explain.depesz.com

PostgreSQL's explain analyze made readable

Result: N0a : ptimization for: plan #s2J6

Settings

Optimization path:

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

Aggregate (cost=3,029,561,419.88..3,029,561,419.89 rows=1 width=0) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Seq Scan on documentversion this_ (cost=83,702.18..3,029,561,419.87 rows=2 width=0) (actual rows= loops=)

  • Filter: (((SubPlan 1) AND ((file)::text = 'fe09ef91-8d37-4694-82a2-090ebffa38de'::text)) OR ((file)::text = '173895'::text))
3.          

SubPlan (forSeq Scan)

4. 0.000 0.000 ↓ 0.0

Materialize (cost=83,702.18..140,992.67 rows=2,331,525 width=8) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

Merge Join (cost=83,702.18..120,227.04 rows=2,331,525 width=8) (actual rows= loops=)

  • Merge Cond: (c.setid = p.usersecuritysetcacheid)
6. 0.000 0.000 ↓ 0.0

Index Only Scan using ix_ussc_setid_userid on usersecuritysetcache c (cost=0.28..12.48 rows=354 width=8) (actual rows= loops=)

  • Index Cond: (userid = 10)
7. 0.000 0.000 ↓ 0.0

Materialize (cost=83,701.90..86,781.55 rows=615,931 width=16) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Sort (cost=83,701.90..85,241.73 rows=615,931 width=16) (actual rows= loops=)

  • Sort Key: p.usersecuritysetcacheid
9. 0.000 0.000 ↓ 0.0

Index Only Scan using ix_dmsobjectpermission_n1 on dmsobjectpermission p (cost=0.55..17,704.71 rows=615,931 width=16) (actual rows= loops=)

  • Index Cond: (permissionid = 'ebd6105a-ab44-404d-8b03-1d260ebb2881'::uuid)