explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 9fmh

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

Unique (cost=193,925.70..193,926.77 rows=143 width=5) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Sort (cost=193,925.70..193,926.06 rows=143 width=5) (actual rows= loops=)

  • Sort Key: org.id, ((SubPlan 1))
3. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.53..193,920.58 rows=143 width=5) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

Function Scan on getorgtree orgtree (cost=0.25..10.25 rows=1,000 width=4) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

Index Scan using pk_organisation on organisation org (cost=0.28..169.97 rows=1 width=4) (actual rows= loops=)

  • Index Cond: (id = orgtree.id)
  • Filter: (isactive AND (organisationroleid = 3) AND (SubPlan 2))
6.          

SubPlan (forIndex Scan)

7. 0.000 0.000 ↓ 0.0

Aggregate (cost=167.39..167.40 rows=1 width=1) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.71..167.39 rows=1 width=0) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

Index Scan using ix_roadworkcontract_roadworkcontractpublicspacemanagerid on roadworkcontract rc_1 (cost=0.29..49.02 rows=14 width=4) (actual rows= loops=)

  • Index Cond: (roadworkcontractpublicspacemanagerid = 50)
10. 0.000 0.000 ↓ 0.0

Index Scan using ix_roadworkcontractowners_organisationid_roadworkcontowner on roadworkcontractowners rco_1 (cost=0.42..8.45 rows=1 width=4) (actual rows= loops=)

  • Index Cond: ((organisationid = org.id) AND (roadworkcontractownerid = rc_1.id))
  • Filter: isactive
11.          

SubPlan (forNested Loop)

12. 0.000 0.000 ↓ 0.0

Aggregate (cost=167.39..167.40 rows=1 width=1) (actual rows= loops=)

13. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.71..167.39 rows=1 width=0) (actual rows= loops=)

14. 0.000 0.000 ↓ 0.0

Index Scan using ix_roadworkcontract_roadworkcontractpublicspacemanagerid on roadworkcontract rc (cost=0.29..49.02 rows=14 width=4) (actual rows= loops=)

  • Index Cond: (roadworkcontractpublicspacemanagerid = 50)
15. 0.000 0.000 ↓ 0.0

Index Scan using ix_roadworkcontractowners_organisationid_roadworkcontowner on roadworkcontractowners rco (cost=0.42..8.45 rows=1 width=4) (actual rows= loops=)

  • Index Cond: ((organisationid = org.id) AND (roadworkcontractownerid = rc.id))