explain.depesz.com

PostgreSQL's explain analyze made readable

Result: pquJ

Settings
# exclusive inclusive rows x rows loops node
1. 3.285 46,341.583 ↓ 965.0 965 1

GroupAggregate (cost=100.97..100.99 rows=1 width=12) (actual time=46,336.281..46,341.583 rows=965 loops=1)

  • Group Key: users.id
2. 10.705 46,338.298 ↓ 17,933.0 17,933 1

Sort (cost=100.97..100.97 rows=1 width=4) (actual time=46,336.267..46,338.298 rows=17,933 loops=1)

  • Sort Key: users.id
  • Sort Method: quicksort Memory: 1609kB
3. 8.121 46,327.593 ↓ 17,933.0 17,933 1

Nested Loop (cost=0.88..100.96 rows=1 width=4) (actual time=0.234..46,327.593 rows=17,933 loops=1)

4. 40.851 40.851 ↓ 3,483.0 3,483 1

Index Scan using idx_users_06_08122018 on users (cost=0.44..7.81 rows=1 width=4) (actual time=0.102..40.851 rows=3,483 loops=1)

  • Index Cond: ((manager_id IS NOT NULL) AND (manager_id = 250))
  • Filter: (status_id <> 1)
5. 46,278.621 46,278.621 ↓ 5.0 5 3,483

Index Scan using index_gamepay_orders_on_user_id on gamepay_orders (cost=0.44..93.13 rows=1 width=4) (actual time=11.951..13.287 rows=5 loops=3,483)

  • Index Cond: (user_id = users.id)
  • Filter: (((status)::text = 'success'::text) AND ((updated_at)::date >= '2020-01-01'::date) AND ((updated_at)::date <= '2020-01-31'::date))
  • Rows Removed by Filter: 171
Planning time : 10.273 ms
Execution time : 46,341.933 ms