explain.depesz.com

PostgreSQL's explain analyze made readable

Result: iiFJ

Settings
# exclusive inclusive rows x rows loops node
1. 0.003 3.042 ↓ 0.0 0 1

Sort (cost=12,773.44..12,773.44 rows=1 width=392) (actual time=3.042..3.042 rows=0 loops=1)

  • Sort Key: (sum(carpl.earned_number_of_points)) DESC, (row_number() OVER (?))
  • Sort Method: quicksort Memory: 25kB
2. 0.001 3.039 ↓ 0.0 0 1

WindowAgg (cost=12,773.39..12,773.43 rows=1 width=392) (actual time=3.039..3.039 rows=0 loops=1)

3. 0.002 3.038 ↓ 0.0 0 1

WindowAgg (cost=12,773.39..12,773.41 rows=1 width=384) (actual time=3.038..3.038 rows=0 loops=1)

4. 0.012 3.036 ↓ 0.0 0 1

Sort (cost=12,773.39..12,773.39 rows=1 width=376) (actual time=3.036..3.036 rows=0 loops=1)

  • Sort Key: (sum(carpl.earned_number_of_points)) DESC
  • Sort Method: quicksort Memory: 25kB
5. 0.004 3.024 ↓ 0.0 0 1

GroupAggregate (cost=12,773.36..12,773.38 rows=1 width=376) (actual time=3.024..3.024 rows=0 loops=1)

  • Group Key: ca.id
6. 0.003 3.020 ↓ 0.0 0 1

Sort (cost=12,773.36..12,773.36 rows=1 width=376) (actual time=3.020..3.020 rows=0 loops=1)

  • Sort Key: ca.id
  • Sort Method: quicksort Memory: 25kB
7. 0.001 3.017 ↓ 0.0 0 1

Nested Loop (cost=78.68..12,773.35 rows=1 width=376) (actual time=3.017..3.017 rows=0 loops=1)

8. 3.016 3.016 ↓ 0.0 0 1

Seq Scan on call_agents ca (cost=0.00..367.85 rows=1 width=368) (actual time=3.016..3.016 rows=0 loops=1)

  • Filter: ((NOT is_disabled) AND (date_terminated IS NULL) AND (department_id = 13) AND (team_id = 1,046))
  • Rows Removed by Filter: 7,102
9. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on call_agent_reward_point_logs carpl (cost=78.68..12,405.49 rows=1 width=12) (never executed)

  • Recheck Cond: (call_agent_id = ca.id)
  • Filter: ((added_date >= '08/01/2020'::date) AND (earned_number_of_points > '0'::double precision) AND (added_date <= now()))
10. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on idx_call_agent_reward_point_logs_call_agent_id (cost=0.00..78.68 rows=4,033 width=0) (never executed)

  • Index Cond: (call_agent_id = ca.id)
Planning time : 0.656 ms
Execution time : 3.149 ms