explain.depesz.com

PostgreSQL's explain analyze made readable

Result: OEtw

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

Aggregate (cost=3,410.86..3,410.87 rows=1 width=8) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Sort (cost=3,410.83..3,410.84 rows=2 width=12) (actual rows= loops=)

  • Sort Key: (count(o.id)) DESC
3. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=1.54..3,410.82 rows=2 width=12) (actual rows= loops=)

  • Group Key: o.executor_id
4. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.54..3,410.79 rows=2 width=8) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.12..3,316.74 rows=12 width=12) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.69..3,074.82 rows=420 width=8) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

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

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

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

  • Index Cond: (id = s.user_id)
  • Filter: (active AND allow_invites AND (id <> 19834))
9. 0.000 0.000 ↓ 0.0

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

  • Index Cond: ((user_id = u.id) AND (discipline_id = 104))
10. 0.000 0.000 ↓ 0.0

Index Scan using orders_executor_id_idx on orders o (cost=0.43..7.80 rows=4 width=8) (actual rows= loops=)

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