explain.depesz.com

PostgreSQL's explain analyze made readable

Result: lg6b

Settings
# exclusive inclusive rows x rows loops node
1. 1.725 73.686 ↑ 1.0 1 1

Aggregate (cost=968.73..968.74 rows=1 width=8) (actual time=73.685..73.686 rows=1 loops=1)

2. 1.551 71.961 ↓ 4,745.0 9,490 1

Nested Loop (cost=1.27..968.73 rows=2 width=4) (actual time=0.117..71.961 rows=9,490 loops=1)

3. 0.056 3.016 ↓ 5.2 62 1

Nested Loop (cost=0.84..853.40 rows=12 width=12) (actual time=0.083..3.016 rows=62 loops=1)

  • Join Filter: (s.user_id = u.id)
4. 0.090 2.424 ↑ 2.3 67 1

Nested Loop (cost=0.42..641.92 rows=151 width=8) (actual time=0.069..2.424 rows=67 loops=1)

5. 0.184 0.184 ↓ 1.0 430 1

Seq Scan on users_status_assign s (cost=0.00..11.39 rows=426 width=4) (actual time=0.025..0.184 rows=430 loops=1)

  • Filter: (status_id = ANY ('{1,2,5,6}'::integer[]))
6. 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
7. 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 <> 19831))
  • Rows Removed by Filter: 0
8. 67.394 67.394 ↓ 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.144..1.087 rows=153 loops=62)

  • Index Cond: (executor_id = u.id)
  • Filter: ((discipline_id = 104) AND (status = 4))
  • Rows Removed by Filter: 531
Planning time : 2.101 ms
Execution time : 73.750 ms