explain.depesz.com

PostgreSQL's explain analyze made readable

Result: sW2A

Settings
# exclusive inclusive rows x rows loops node
1. 0.062 5.969 ↑ 1.0 1 1

GroupAggregate (cost=2.00..904.98 rows=1 width=20) (actual time=5.969..5.969 rows=1 loops=1)

  • Group Key: groups_users.group_id
2. 0.027 5.907 ↓ 252.0 252 1

Nested Loop (cost=2.00..904.96 rows=1 width=5) (actual time=0.079..5.907 rows=252 loops=1)

3. 0.056 5.376 ↓ 252.0 252 1

Nested Loop (cost=1.72..896.65 rows=1 width=9) (actual time=0.068..5.376 rows=252 loops=1)

  • Join Filter: (groups_users.user_id = user_hubs.user_id)
4. 0.017 3.790 ↓ 85.0 255 1

Nested Loop (cost=1.29..894.13 rows=3 width=17) (actual time=0.054..3.790 rows=255 loops=1)

  • Join Filter: (groups_users.user_id = users.id)
5. 0.236 1.988 ↓ 36.4 255 1

Nested Loop (cost=0.86..872.11 rows=7 width=13) (actual time=0.041..1.988 rows=255 loops=1)

6. 0.724 0.724 ↓ 3.3 257 1

Index Scan using groups_users_group_id_user_id_unique on groups_users (cost=0.42..512.62 rows=78 width=9) (actual time=0.024..0.724 rows=257 loops=1)

  • Index Cond: (group_id = 1242)
  • Filter: (approved AND (import_status = 'joined'::text))
  • Rows Removed by Filter: 90
7. 1.028 1.028 ↑ 1.0 1 257

Index Only Scan using user_clusters_user_id_hub_id_unique on user_clusters (cost=0.43..4.61 rows=1 width=4) (actual time=0.004..0.004 rows=1 loops=257)

  • Index Cond: ((cluster_id = 39) AND (user_id = groups_users.user_id))
  • Heap Fetches: 37
8. 1.785 1.785 ↑ 1.0 1 255

Index Scan using users_pkey on users (cost=0.43..3.13 rows=1 width=4) (actual time=0.007..0.007 rows=1 loops=255)

  • Index Cond: (id = user_clusters.user_id)
  • Filter: (deleted_at IS NULL)
9. 1.530 1.530 ↑ 1.0 1 255

Index Scan using active_user_hub_signup_stage on user_hubs (cost=0.42..0.83 rows=1 width=8) (actual time=0.006..0.006 rows=1 loops=255)

  • Index Cond: ((user_id = users.id) AND (hub_id = 39))
  • Filter: (visibility <> 'PRIVATE'::text)
  • Rows Removed by Filter: 0
10. 0.504 0.504 ↑ 1.0 1 252

Index Scan using groups_pkey on groups (cost=0.28..8.30 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=252)

  • Index Cond: (id = 1242)
  • Filter: ((deleted_at IS NULL) AND (hub_id = 39))
Planning time : 1.839 ms
Execution time : 6.078 ms