Kürzlich hat mich ein Kunde gefragt, ob das “aufwändige” Index-Prüfen nicht einem Index-Optimierer überlassen werden könnte. Klar geht das…
Was wollen wir den genau überprüfen?
- Tabellen ohne Primary Key
- Doppelte Indices
- Teilweise redundante Indices
- Ungenutzte Indices
MariaDB, MySQL und Percona Server
Tabellen ohne Primary Key
SQL> SELECT DISTINCT t.table_schema, t.table_name
FROM information_schema.tables AS t
LEFT JOIN information_schema.columns AS c ON t.table_schema = …