explain.depesz.com

PostgreSQL's explain analyze made readable

Result: XaiW

Settings
# exclusive inclusive rows x rows loops node
1. 0.152 9,786.518 ↓ 51.0 51 1

Sort (cost=24,453.33..24,453.34 rows=1 width=48) (actual time=9,786.516..9,786.518 rows=51 loops=1)

  • Sort Key: agent_xdk_queues.display_name
  • Sort Method: quicksort Memory: 28kB
2. 0.692 9,786.366 ↓ 51.0 51 1

GroupAggregate (cost=16,091.93..24,453.32 rows=1 width=48) (actual time=293.914..9,786.366 rows=51 loops=1)

  • Group Key: agent_xdk_queues.id
3. 18.713 9,785.674 ↓ 78.1 2,343 1

Nested Loop Left Join (cost=16,091.93..24,453.16 rows=30 width=48) (actual time=259.342..9,785.674 rows=2,343 loops=1)

  • Join Filter: (agent_xdk_assignments.queue_id = agent_xdk_queues.id)
  • Rows Removed by Join Filter: 115800
4. 0.155 0.155 ↓ 51.0 51 1

Index Scan using agent_xdk_queues_pkey on agent_xdk_queues (cost=0.14..13.24 rows=1 width=40) (actual time=0.005..0.155 rows=51 loops=1)

  • Filter: (forwarding_queue_id IS NULL)
  • Rows Removed by Filter: 22
5. 9,001.857 9,766.806 ↓ 1.1 2,316 51

Bitmap Heap Scan on agent_xdk_assignments (cost=16,091.78..24,412.84 rows=2,167 width=16) (actual time=24.089..191.506 rows=2,316 loops=51)

  • Recheck Cond: ((state)::text = 'active'::text)
  • Rows Removed by Index Recheck: 741605
  • Heap Blocks: exact=1728620 lossy=1698198
6. 764.949 764.949 ↓ 52.0 112,784 51

Bitmap Index Scan on assignment_conversation_id_and_state (cost=0.00..16,091.24 rows=2,167 width=0) (actual time=14.999..14.999 rows=112,784 loops=51)

Planning time : 0.212 ms
Execution time : 9,787.332 ms