explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Rw9Q

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

Sort (cost=320,431.86..320,531.86 rows=40,000 width=166) (actual rows= loops=)

  • Sort Key: ua.asset_id
2. 0.000 0.000 ↓ 0.0

HashAggregate (cost=316,874.32..317,374.32 rows=40,000 width=166) (actual rows= loops=)

  • Group Key: ua.asset_id, u.name
3. 0.000 0.000 ↓ 0.0

HashAggregate (cost=269,420.43..286,676.39 rows=1,725,596 width=352) (actual rows= loops=)

  • Group Key: ua.asset_id, u.organization, u.name
4. 0.000 0.000 ↓ 0.0

Append (cost=31,902.49..256,478.46 rows=1,725,596 width=352) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

Hash Join (cost=31,902.49..99,600.89 rows=796,998 width=34) (actual rows= loops=)

  • Hash Cond: (ua.universe_id = u.id)
6. 0.000 0.000 ↓ 0.0

Hash Join (cost=31,811.26..97,350.37 rows=796,998 width=20) (actual rows= loops=)

  • Hash Cond: (ua.asset_id = a.id)
7. 0.000 0.000 ↓ 0.0

Seq Scan on universe_assets ua (cost=0.00..62,198.41 rows=1,272,641 width=20) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Hash (cost=25,139.06..25,139.06 rows=533,776 width=16) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

Seq Scan on assets a (cost=0.00..25,139.06 rows=533,776 width=16) (actual rows= loops=)

  • Filter: (discovery_status = 200)
10. 0.000 0.000 ↓ 0.0

Hash (cost=89.58..89.58 rows=132 width=22) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

Index Scan using universes_pkey on universes u (cost=0.14..89.58 rows=132 width=22) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

Hash Join (cost=31,930.01..139,621.61 rows=928,598 width=34) (actual rows= loops=)

  • Hash Cond: (ua_1.universe_id = u_1.id)
13. 0.000 0.000 ↓ 0.0

Hash Join (cost=31,838.78..137,014.55 rows=928,598 width=20) (actual rows= loops=)

  • Hash Cond: (ur.child_id = a_1.id)
14. 0.000 0.000 ↓ 0.0

Merge Join (cost=27.52..101,602.89 rows=1,371,570 width=20) (actual rows= loops=)

  • Merge Cond: (ur.parent_id = ua_1.asset_id)
15. 0.000 0.000 ↓ 0.0

Index Only Scan using underlying_relationships_pkey on underlying_relationships ur (cost=0.42..4,944.01 rows=193,980 width=32) (actual rows= loops=)

16. 0.000 0.000 ↓ 0.0

Materialize (cost=0.43..85,613.78 rows=1,272,641 width=20) (actual rows= loops=)

17. 0.000 0.000 ↓ 0.0

Index Scan using idx_universe_assets_assetid on universe_assets ua_1 (cost=0.43..82,432.18 rows=1,272,641 width=20) (actual rows= loops=)

18. 0.000 0.000 ↓ 0.0

Hash (cost=25,139.06..25,139.06 rows=533,776 width=16) (actual rows= loops=)

19. 0.000 0.000 ↓ 0.0

Seq Scan on assets a_1 (cost=0.00..25,139.06 rows=533,776 width=16) (actual rows= loops=)

  • Filter: (discovery_status = 200)
20. 0.000 0.000 ↓ 0.0

Hash (cost=89.58..89.58 rows=132 width=22) (actual rows= loops=)

21. 0.000 0.000 ↓ 0.0

Index Scan using universes_pkey on universes u_1 (cost=0.14..89.58 rows=132 width=22) (actual rows= loops=)