explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 13Pj

Settings
# exclusive inclusive rows x rows loops node
1. 0.028 74.604 ↑ 1.0 1 1

Aggregate (cost=977.16..977.17 rows=1 width=8) (actual time=74.604..74.604 rows=1 loops=1)

2. 0.785 74.576 ↓ 25.5 51 1

Group (cost=1.54..977.13 rows=2 width=4) (actual time=0.317..74.576 rows=51 loops=1)

  • Group Key: o.executor_id
3. 1.346 73.791 ↓ 4,745.0 9,490 1

Nested Loop (cost=1.54..977.13 rows=2 width=4) (actual time=0.316..73.791 rows=9,490 loops=1)

4. 0.079 3.377 ↓ 5.2 62 1

Nested Loop (cost=1.12..861.80 rows=12 width=12) (actual time=0.164..3.377 rows=62 loops=1)

  • Join Filter: (s.user_id = u.id)
5. 0.110 2.762 ↑ 2.3 67 1

Nested Loop (cost=0.70..650.32 rows=151 width=8) (actual time=0.033..2.762 rows=67 loops=1)

6. 0.502 0.502 ↓ 1.0 430 1

Index Scan using users_status_assign_user_id_idx on users_status_assign s (cost=0.27..19.79 rows=426 width=4) (actual time=0.013..0.502 rows=430 loops=1)

  • Filter: ((id IS NOT NULL) AND (status_id = ANY ('{1,2,5,6}'::integer[])))
7. 2.150 2.150 ↓ 0.0 0 430

Index Only Scan using users_disciplines_unique_idx on users_disciplines d (cost=0.42..1.47 rows=1 width=4) (actual time=0.005..0.005 rows=0 loops=430)

  • Index Cond: ((user_id = s.user_id) AND (discipline_id = 104))
  • Heap Fetches: 60
8. 0.536 0.536 ↑ 1.0 1 67

Index Scan using users_pkey on users u (cost=0.42..1.39 rows=1 width=4) (actual time=0.008..0.008 rows=1 loops=67)

  • Index Cond: (id = d.user_id)
  • Filter: (active AND allow_invites AND (id <> 1))
  • Rows Removed by Filter: 0
9. 69.068 69.068 ↓ 30.6 153 62

Index Scan using orders_executor_id_idx on orders o (cost=0.43..9.56 rows=5 width=4) (actual time=0.135..1.114 rows=153 loops=62)

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