Recently one of our client approach Mydbops with Query slowness on a MySQL environment . They deployed the new code for generate the huge reports for the year end analytics data . After the deployment the queries were extremely slow and they struggled lot , then they approached us for the solution. After the analysis, their OLAP database as expected it was IO bound with 100% disk IOPS utilised during the report generation. So, the queries were starving for the Disk IO slows the process .
Problem statement :
- Reports are majorly focused on two larger log tables ( emp_Report_model , emp_details ) .
- The report generator (procedure) is using the count(*) statement to stimulate the aggregated data on each call. It is required for their business purpose .
- Count(*) is terribly slow in MySQL ( Using MySQL 5.7 ) as it …