explain.depesz.com

PostgreSQL's explain analyze made readable

Result: zoPM

Settings
# exclusive inclusive rows x rows loops node
1. 0.001 31.212 ↓ 0.0 0 1

Limit (cost=8,044.85..8,044.85 rows=1 width=91) (actual time=31.212..31.212 rows=0 loops=1)

2. 0.005 31.211 ↓ 0.0 0 1

Sort (cost=8,044.85..8,044.85 rows=1 width=91) (actual time=31.211..31.211 rows=0 loops=1)

  • Sort Key: (((c.fields -> 'sla'::text) ->> 'dueAt'::text))
  • Sort Method: quicksort Memory: 25kB
3. 0.007 31.206 ↓ 0.0 0 1

Nested Loop Left Join (cost=7,974.61..8,044.84 rows=1 width=91) (actual time=31.206..31.206 rows=0 loops=1)

  • Filter: (active_realtime.id IS NULL)
  • Rows Removed by Filter: 31
4. 23.199 23.201 ↓ 5.2 31 1

Index Scan using conversation_counts_new_idx on conversations c (cost=7,974.11..7,993.66 rows=6 width=618) (actual time=0.598..23.201 rows=31 loops=1)

  • Index Cond: (((fields -> 'assignee'::text) ->> 'routingGroupId'::text) = ANY ('{j0NYS6ogTL2yRaQXLm3yyg,SE2DikRYRNyKZN2qL5LwHA,ujlw9fbaRauxhe2n1Wyr6Q}'::text[]))
  • Filter: ((NOT (hashed SubPlan 1)) AND (NOT (hashed SubPlan 2)) AND (((fields -> 'sla'::text) ->> 'dueAt'::text) IS NOT NULL))
  • Rows Removed by Filter: 32
5.          

SubPlan (forIndex Scan)

6. 0.000 0.000 ↓ 0.0 0 1

Result (cost=0.00..0.01 rows=1 width=32) (actual time=0.000..0.000 rows=0 loops=1)

  • One-Time Filter: false
7. 0.000 0.002 ↓ 0.0 0 1

Nested Loop (cost=0.56..7,973.67 rows=1 width=23) (actual time=0.002..0.002 rows=0 loops=1)

8. 0.002 0.002 ↓ 0.0 0 1

Seq Scan on customer_assignees ca (cost=0.00..16.30 rows=630 width=96) (actual time=0.001..0.002 rows=0 loops=1)

9. 0.000 0.000 ↓ 0.0 0

Index Scan using customer_conversations_idx on conversations (cost=0.56..12.62 rows=1 width=614) (never executed)

  • Index Cond: ((fields ->> 'customerId'::text) = ca.id)
  • Filter: ((ca.agent_id = ((fields -> 'assignee'::text) ->> 'agentId'::text)) AND (ca.routing_group_id = ((fields -> 'assignee'::text) ->> 'routingGroupId'::text)) AND ((((fields -> 'sla'::text) ->> 'dueAt'::text))::timestamp with time zone > now()))
10. 7.998 7.998 ↑ 1.0 1 31

Index Scan using active_chat_conversation_id_external_conversation_id_idx on conversation_items active_realtime (cost=0.50..8.52 rows=1 width=46) (actual time=0.256..0.258 rows=1 loops=31)

  • Index Cond: (c.id = conversation_id)
Planning time : 1.383 ms
Execution time : 31.278 ms