PlanetScale

Introducing schema recommendations

Feb 28, 2024Taylor Barnett, Rafer Hazen
Introducing schema recommendations
SummaryAI, from the source post

This post introduces 'Schema recommendations' as a new feature within PlanetScale Insights. It details the 'Schema Advisor' system that generates recommendations by analyzing query performance data and schema. Specific recommendation types include adding indexes for inefficient queries (using query parsing and column cardinality estimation), removing redundant indexes (exact and left prefix duplicates), preventing primary key ID exhaustion (monitoring AUTO_INCREMENT values and foreign key joins), and dropping unused tables. The post provides an example of adding an index to improve query latency.

More from the Database Benchmarking Best Practices trail