explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Gsmn

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

Merge Right Join (cost=12,520,222.24..86,159,514.38 rows=4,897,443,039 width=58) (actual rows= loops=)

  • Merge Cond: ((src_membership.group_id)::text = (access.source)::text)
2. 0.000 0.000 ↓ 0.0

Sort (cost=226,389.86..230,370.43 rows=1,592,228 width=22) (actual rows= loops=)

  • Sort Key: src_membership.group_id
3. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=10,495.44..62,369.55 rows=1,592,228 width=22) (actual rows= loops=)

  • Hash Cond: ((src_membership.asset_id)::text = (src_tag.asset_id)::text)
4. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=2,790.00..18,816.52 rows=549,664 width=14) (actual rows= loops=)

  • Hash Cond: ((src_membership.asset_id)::text = (source_app.asset_id)::text)
5. 0.000 0.000 ↓ 0.0

Seq Scan on membership src_membership (cost=0.00..8,468.64 rows=549,664 width=12) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Hash (cost=1,540.00..1,540.00 rows=100,000 width=7) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Seq Scan on application source_app (cost=0.00..1,540.00 rows=100,000 width=7) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Hash (cost=4,326.86..4,326.86 rows=270,286 width=13) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

Seq Scan on tag src_tag (cost=0.00..4,326.86 rows=270,286 width=13) (actual rows= loops=)

10. 0.000 0.000 ↓ 0.0

Materialize (cost=12,293,830.64..12,633,215.99 rows=67,877,070 width=43) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

Sort (cost=12,293,830.64..12,463,523.32 rows=67,877,070 width=43) (actual rows= loops=)

  • Sort Key: access.source
12. 0.000 0.000 ↓ 0.0

Merge Left Join (cost=353,473.85..1,376,222.51 rows=67,877,070 width=43) (actual rows= loops=)

  • Merge Cond: ((access.destination)::text = (dst_membership.group_id)::text)
13. 0.000 0.000 ↓ 0.0

Sort (cost=126,781.74..129,373.41 rows=1,036,668 width=28) (actual rows= loops=)

  • Sort Key: access.destination
14. 0.000 0.000 ↓ 0.0

Seq Scan on access (cost=0.00..23,200.35 rows=1,036,668 width=28) (actual rows= loops=)

  • Filter: ((tenant_id)::text = '1'::text)
15. 0.000 0.000 ↓ 0.0

Sort (cost=226,389.86..230,370.43 rows=1,592,228 width=22) (actual rows= loops=)

  • Sort Key: dst_membership.group_id
16. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=10,495.44..62,369.55 rows=1,592,228 width=22) (actual rows= loops=)

  • Hash Cond: ((dst_membership.asset_id)::text = (dst_tag.asset_id)::text)
17. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=2,790.00..18,816.52 rows=549,664 width=14) (actual rows= loops=)

  • Hash Cond: ((dst_membership.asset_id)::text = (dst_app.asset_id)::text)
18. 0.000 0.000 ↓ 0.0

Seq Scan on membership dst_membership (cost=0.00..8,468.64 rows=549,664 width=12) (actual rows= loops=)

19. 0.000 0.000 ↓ 0.0

Hash (cost=1,540.00..1,540.00 rows=100,000 width=7) (actual rows= loops=)

20. 0.000 0.000 ↓ 0.0

Seq Scan on application dst_app (cost=0.00..1,540.00 rows=100,000 width=7) (actual rows= loops=)

21. 0.000 0.000 ↓ 0.0

Hash (cost=4,326.86..4,326.86 rows=270,286 width=13) (actual rows= loops=)

22. 0.000 0.000 ↓ 0.0

Seq Scan on tag dst_tag (cost=0.00..4,326.86 rows=270,286 width=13) (actual rows= loops=)