iachat/spec/enterprise
Pranav 16b98b6017
fix: Add account_id to the query to force using a better index (#12420)
I've added the account_id filter to the
`get_agent_ids_over_assignment_limit` method. This optimization will
help the query leverage the existing composite index
`conv_acid_inbid_stat_asgnid_idx (account_id, inbox_id, status,
assignee_id)` for better performance.

**Before:**
```sql
HashAggregate (cost=224238.12..224256.27 rows=484 width=4)
Group Key: assignee_id
Filter: (count(*) >= 10)
-> Index Scan using index_conversations_on_inbox_id on conversations (cost=0.44..223963.67 rows=54891 width=4)
Index Cond: (inbox_id = ???)
Filter: (status = 0)
```

**After:**
```sql
GroupAggregate (cost=0.44..5688.30 rows=476 width=4)
Group Key: assignee_id
Filter: (count(*) >= 10)
-> Index Only Scan using conv_acid_inbid_stat_asgnid_idx on conversations (cost=0.44..5640.81 rows=5928 width=4)
Index Cond: ((account_id = ??) AND (inbox_id = ??) AND (status = 0))
```
2025-09-11 22:27:38 -07:00
..
builders feat: SAML authentication controllers [CW-2958] (#12319) 2025-09-10 20:02:27 +05:30
controllers fix: Assignment V2 controller fix (#12415) 2025-09-11 19:32:33 +07:00
drops feat: Add push/email notification support for SLA (#9140) 2024-03-29 20:27:21 +11:00
jobs feat: Add BE changes for captain pdf support for faq generation (#12113) 2025-08-27 20:31:22 +05:30
lib feat: scenario agents & runner (#11944) 2025-08-14 12:39:21 +05:30
listeners feat: Add support for realtime-events in copilot-threads and copilot-messages (#11557) 2025-05-22 22:25:05 -07:00
mailers/enterprise/agent_notifications feat: Add push/email notification support for SLA (#9140) 2024-03-29 20:27:21 +11:00
models fix: Add account_id to the query to force using a better index (#12420) 2025-09-11 22:27:38 -07:00
policies fix: Allow users with report_manage permission to access CSAT reports (#11625) 2025-05-29 12:09:03 -06:00
presenters/conversations feat: Conversation API to return applied_sla and sla_events (#9174) 2024-04-01 23:30:07 +05:30
services feat(voice): Incoming voice calls [EE] (#12361) 2025-09-08 22:35:23 +05:30