AstRecipes » Optimizing QueueMetrics data access
If you run a very large call center and your queue_log table starts to get big (>1M lines), you can apply the following techniques to improve database performance. 1. Create a complete index The default index used for access, called "partizione_b", is not very efficient for huge datasets because its granularity is aimed only at partition and time period. To make an idex such that all queries can be "solved" completely through the index, you should drop other indices and create this one:ALTER TABLE `queue_log` ADD INDEX (
partition(9), time_id, unique_row_count, queue(15)
)
SELECT DISTINCT partition, length( partition ) AS L FROM queue_log
SELECT DISTINCT queue, length( queue ) AS L FROM queue_log
If your performace is suboptimal, you should make a log of slow queries. This is easily done in MySQL: see the article MySQL's Over-looked and Under-worked Slow Query Log
Query_time: 6 Lock_time: 0 Rows_sent: 12999 Rows_examined: 988483
mysqldumpslow name-of-slow-query-log
ALTER TABLE queue_log
ORDER BY partition, time_id, unique_row_count
Softlinks:
Home Page - Installing QueueMetrics - Installing QueueMetrics from scratch - Avoiding queue_log file rotation - AddQueueMember and the queue_log file - Compiling Asterisk 1.4 with TDM400 and H323 - Installing Queuemetrics on Debian - Improving AstRecipes - Listening to recorded calls using XC-AST - Manually updating QueueMetrics - Managing agents that dynamically log-on - Using a HT-488 with Asterisk - QueueMetrics - Upgrading QueueMetrics licences - QueueMetrics logs - Installing QueueMetrics on Fonality PBXtra - Installing the Linksys PAP2-NA port adapter - Installing XC-AST - Installing XC-AST under Jetty - Installing QueueMetrics using Yum - Installing Queuemetrics on PBX-in-a-Flash - Administering QueueMetrics using Tomcat - Rebuilding Fonality queue_log - Debugging Qloaderd installation - Installing QueueMetrics beta through RPM - AstRecipes markup - Installing Ubuntu over HTTP - Utenti/Installing QueueMetrics using Yum - Installing the Welltech LP302 telephone
Home Page - Installing QueueMetrics - Installing QueueMetrics from scratch - Avoiding queue_log file rotation - AddQueueMember and the queue_log file - Compiling Asterisk 1.4 with TDM400 and H323 - Installing Queuemetrics on Debian - Improving AstRecipes - Listening to recorded calls using XC-AST - Manually updating QueueMetrics - Managing agents that dynamically log-on - Using a HT-488 with Asterisk - QueueMetrics - Upgrading QueueMetrics licences - QueueMetrics logs - Installing QueueMetrics on Fonality PBXtra - Installing the Linksys PAP2-NA port adapter - Installing XC-AST - Installing XC-AST under Jetty - Installing QueueMetrics using Yum - Installing Queuemetrics on PBX-in-a-Flash - Administering QueueMetrics using Tomcat - Rebuilding Fonality queue_log - Debugging Qloaderd installation - Installing QueueMetrics beta through RPM - AstRecipes markup - Installing Ubuntu over HTTP - Utenti/Installing QueueMetrics using Yum - Installing the Welltech LP302 telephone



