get_fragmented_tables
Identify MySQL tables with significant fragmentation that waste disk space and slow query performance. Analyze user tables to detect fragmentation caused by data deletion, frequent updates, or VARCHAR/TEXT modifications.
Instructions
Find user tables with significant fragmentation.
Fragmentation occurs when:
Data is deleted from tables
Tables are frequently updated
VARCHAR/TEXT columns are modified
Note: This tool only analyzes user/custom tables and excludes MySQL system tables (mysql, information_schema, performance_schema, sys) by default.
High fragmentation wastes disk space and can slow queries.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| min_fragmentation_pct | No | Minimum fragmentation percentage threshold | |
| min_data_free_mb | No | Minimum wasted space in MB | |
| schema_name | No | Filter by specific schema | |
| limit | No | Maximum tables to return |