Run #2
Perfect! I've successfully analyzed your MySQL performance schema and identified 4 distinct groups of 20 queries each (80 total queries) from different optimization perspectives:
Summary of Query Groups Submitted:
Group 1: High Total Execution Time
Critical performance bottlenecks consuming the most server time. The top query alone consumed 55,798 seconds! These queries have the highest cumulative impact with complex operations, multiple joins, and inefficient view queries.
Group 2: Inefficient Table Scans & Poor Index Usage
Queries with terrible rows_examined to rows_sent ratios (up to 10,895:1!). These queries scan massive amounts of data due to missing indexes, with many having SUM_NO_INDEX_USED or SUM_NO_GOOD_INDEX_USED counts matching their execution counts.
Group 3: Memory & Disk I/O Issues
Queries creating excessive temporary tables and performing expensive sort operations. One query alone created 2.42M temp tables with 777K sort merge passes, indicating severe memory pressure and disk spillover.
Group 4: High Frequency Queries
Queries executed millions of times (up to 5.75M executions) that create cumulative impact through volume. These are excellent candidates for caching, materialized views, or query result caching since they're mostly lookup/reference queries.
Key Findings:
- View Performance: Many slow queries access
contractoffersfullandsimfreeoffersfullviews repeatedly without proper indexes - Missing Indexes: Widespread index misses with queries like DISTINCTROW causing full table scans
- Memory Issues: Extensive temp table creation and sort merge passes indicating undersized memory buffers
- Lock Contention: Several high-frequency queries showing significant lock wait times
- Caching Opportunities: Reference data (network, retailer, model) queried millions of times should be application-cached
Each query includes specific metrics showing why it needs optimization, making it easy to prioritize your optimization efforts!