explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 7BDo

Settings
# exclusive inclusive rows x rows loops node
1. 0.040 44.997 ↑ 1.0 1 1

Aggregate (cost=3,411.36..3,411.37 rows=1 width=8) (actual time=44.997..44.997 rows=1 loops=1)

2. 0.684 44.957 ↓ 26.0 52 1

Group (cost=1.54..3,411.34 rows=2 width=4) (actual time=0.166..44.957 rows=52 loops=1)

  • Group Key: o.executor_id
3. 1.189 44.273 ↓ 4,622.5 9,245 1

Nested Loop (cost=1.54..3,411.33 rows=2 width=4) (actual time=0.165..44.273 rows=9,245 loops=1)

4. 0.243 3.889 ↓ 5.6 67 1

Nested Loop (cost=1.12..3,316.74 rows=12 width=12) (actual time=0.125..3.889 rows=67 loops=1)

5. 0.400 2.464 ↑ 1.1 394 1

Nested Loop (cost=0.69..3,074.82 rows=420 width=8) (actual time=0.024..2.464 rows=394 loops=1)

6. 0.340 0.340 ↑ 1.0 431 1

Index Scan using users_status_assign_user_id_idx on users_status_assign s (cost=0.27..36.87 rows=431 width=4) (actual time=0.008..0.340 rows=431 loops=1)

  • Filter: ((id IS NOT NULL) AND (status_id = ANY ('{1,2,5,6}'::integer[])))
7. 1.724 1.724 ↑ 1.0 1 431

Index Scan using users_pkey on users u (cost=0.42..7.04 rows=1 width=4) (actual time=0.004..0.004 rows=1 loops=431)

  • Index Cond: (id = s.user_id)
  • Filter: (active AND allow_invites AND (id <> 19834))
  • Rows Removed by Filter: 0
8. 1.182 1.182 ↓ 0.0 0 394

Index Only Scan using users_disciplines_unique_idx on users_disciplines d (cost=0.42..0.57 rows=1 width=4) (actual time=0.003..0.003 rows=0 loops=394)

  • Index Cond: ((user_id = u.id) AND (discipline_id = 104))
  • Heap Fetches: 67
9. 39.195 39.195 ↓ 34.5 138 67

Index Scan using orders_executor_id_idx on orders o (cost=0.43..7.84 rows=4 width=4) (actual time=0.063..0.585 rows=138 loops=67)

  • Index Cond: (executor_id = u.id)
  • Filter: ((discipline_id = 104) AND (status = 4))
  • Rows Removed by Filter: 476