explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Kg82

Settings
# exclusive inclusive rows x rows loops node
1. 0.093 667.177 ↓ 0.0 0 1

Sort (cost=74,668.93..74,668.94 rows=1 width=392) (actual time=667.177..667.177 rows=0 loops=1)

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

WindowAgg (cost=74,668.88..74,668.92 rows=1 width=392) (actual time=667.084..667.084 rows=0 loops=1)

3. 0.002 667.082 ↓ 0.0 0 1

WindowAgg (cost=74,668.88..74,668.91 rows=1 width=384) (actual time=667.082..667.082 rows=0 loops=1)

4. 0.004 667.080 ↓ 0.0 0 1

Sort (cost=74,668.88..74,668.89 rows=1 width=376) (actual time=667.080..667.080 rows=0 loops=1)

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

GroupAggregate (cost=74,668.85..74,668.87 rows=1 width=376) (actual time=667.076..667.076 rows=0 loops=1)

  • Group Key: ca.id
6. 0.017 667.074 ↓ 0.0 0 1

Sort (cost=74,668.85..74,668.86 rows=1 width=376) (actual time=667.074..667.074 rows=0 loops=1)

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

Nested Loop (cost=1,000.28..74,668.84 rows=1 width=376) (actual time=667.056..667.057 rows=0 loops=1)

8. 20.181 683.599 ↓ 12.0 12 1

Gather (cost=1,000.00..74,652.52 rows=1 width=12) (actual time=666.935..683.599 rows=12 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
9. 663.418 663.418 ↓ 4.0 4 3 / 3

Parallel Seq Scan on call_agent_reward_point_logs carpl (cost=0.00..73,652.42 rows=1 width=12) (actual time=663.416..663.418 rows=4 loops=3)

  • Filter: ((added_date >= '08/01/2020'::date) AND (earned_number_of_points > '0'::double precision) AND (added_date <= now()))
  • Rows Removed by Filter: 979,927
10. 0.096 0.096 ↓ 0.0 0 12

Index Scan using pk_call_agents on call_agents ca (cost=0.28..8.31 rows=1 width=368) (actual time=0.008..0.008 rows=0 loops=12)

  • Index Cond: (id = carpl.call_agent_id)
  • Filter: ((NOT is_disabled) AND (date_terminated IS NULL) AND (department_id = 13) AND (team_id = 1,046))
  • Rows Removed by Filter: 1
Planning time : 2.844 ms
Execution time : 684.067 ms