Skip to content

3806 add date limit to agent history

Etienne Allovon requested to merge 3806-add-date-limit-to-agent-history into 2020.18

Change the /history/agent API to, by default, search only agent calls in the last 7 days. The goal is top optimize the request.

Figures based on EXPLAIN ANALYZE run on two customer dataset:

Customer dataset Measure Old req New req Optimization ratio
Customer 1 (SG)
call_data (total/7 days): 5 000 000/160 000
call_on_queue (total/7 days): 9 000 000/31 000
Cost 447143.82 24444.16 18
Actual time 15765.502 ms 607.628 ms 26
Customer 2 (OP)
call_data (total/7 days): 14 000 000/75 000
call_on_queue (total/7 days): 3 000 000/52 000
Cost 1603675.36 21516.41 74
Actual time 42031.434 ms 😅 432.914 97

Merge request reports