get_statements_with_temp_tables
Identify MySQL queries that create temporary tables to detect potential performance bottlenecks. Helps optimize database performance by revealing queries that may need tuning.
Instructions
Get statements that create temporary tables.
Temporary tables can cause performance issues when:
They're created on disk instead of memory
They're created too frequently
They grow too large
Identifies queries that should be optimized.
Note: This tool excludes queries against MySQL system schemas (mysql, information_schema, performance_schema, sys) to focus on user/application query analysis.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum statements to return | |
| disk_only | No | Only show statements with disk temp tables |