explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Hfwo

Settings
# exclusive inclusive rows x rows loops node
1. 0.093 244.323 ↓ 51.0 51 1

Sort (cost=24,465.21..24,465.21 rows=1 width=48) (actual time=244.321..244.323 rows=51 loops=1)

  • Sort Key: agent_xdk_queues.display_name
  • Sort Method: quicksort Memory: 28kB
2. 0.244 244.230 ↓ 51.0 51 1

GroupAggregate (cost=16,099.93..24,465.20 rows=1 width=48) (actual time=9.880..244.230 rows=51 loops=1)

  • Group Key: agent_xdk_queues.id
3. 8.858 243.986 ↓ 51.1 1,532 1

Nested Loop Left Join (cost=16,099.93..24,465.04 rows=30 width=48) (actual time=6.918..243.986 rows=1,532 loops=1)

  • Join Filter: (agent_xdk_assignments.queue_id = agent_xdk_queues.id)
  • Rows Removed by Join Filter: 75400
4. 0.069 0.069 ↓ 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.004..0.069 rows=51 loops=1)

  • Filter: (forwarding_queue_id IS NULL)
  • Rows Removed by Filter: 22
5. 154.428 235.059 ↑ 1.4 1,508 51

Bitmap Heap Scan on agent_xdk_assignments (cost=16,099.79..24,424.70 rows=2,168 width=16) (actual time=2.241..4.609 rows=1,508 loops=51)

  • Recheck Cond: ((state)::text = 'active'::text)
  • Heap Blocks: exact=294609
6. 80.631 80.631 ↓ 3.9 8,400 51

Bitmap Index Scan on assignment_conversation_id_and_state (cost=0.00..16,099.25 rows=2,168 width=0) (actual time=1.581..1.581 rows=8,400 loops=51)

Planning time : 0.127 ms
Execution time : 244.351 ms