inno health

Per-index B+Tree health metrics including fill factor, fragmentation, and garbage ratio.

Usage

# Text output
inno health -f users.ibd

# JSON output
inno health -f users.ibd --json

# Prometheus metrics
inno health -f users.ibd --prometheus

# Verbose output
inno health -f users.ibd -v

Options

OptionDescription
-f, --filePath to InnoDB data file
-v, --verboseShow additional detail (records, empty leaves)
--jsonOutput in JSON format
--prometheusOutput in Prometheus exposition format
--page-sizeOverride page size
--keyringPath to MySQL keyring file
--bloatCompute bloat scores (grade A-F) per index
--cardinalityEstimate cardinality of leading primary key columns
--sample-sizeNumber of leaf pages to sample per index for cardinality (default: 100)

Metrics

MetricDescription
Fill factorAverage, min, and max page utilization (0-100%)
Garbage ratioPercentage of space occupied by deleted records
FragmentationHow out-of-order pages are relative to sequential layout
Tree depthB+Tree depth per index
Page countsTotal, leaf, and internal page counts per index

Bloat Scoring

Use --bloat to compute a weighted bloat score and letter grade (A-F) for each index:

inno health -f users.ibd --bloat

The score combines fill factor deficit (30%), garbage ratio (25%), fragmentation (25%), and delete-mark ratio (20%). See the Bloat Scoring guide for the full formula and grade definitions.

Cardinality Estimation

Use --cardinality to estimate distinct values for the leading primary key column using deterministic page sampling:

inno health -f users.ibd --cardinality --sample-size 200