get_table_stats
Analyze MySQL table statistics to identify optimization needs, including table size, row counts, index information, and fragmentation levels for performance tuning.
Instructions
Get detailed statistics for MySQL user tables.
Returns information about:
Table size (data, indexes, total)
Row counts and average row length
Index information
Auto-increment values
Table fragmentation
Engine type and collation
Helps identify tables that may need:
Optimization (OPTIMIZE TABLE)
Index improvements
Partitioning consideration
Note: This tool only analyzes user/custom tables and excludes MySQL system tables (mysql, information_schema, performance_schema, sys).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| schema_name | No | Schema/database to analyze (uses current database if not specified) | |
| table_name | No | Specific table to analyze (analyzes all tables if not provided) | |
| include_indexes | No | Include index statistics | |
| order_by | No | Order results by this metric | size |