3652
MariaDBERRORNotableDDLHIGH confidence

Too many indexes defined on table (variant 2)

Production Risk

Low — DDL fails; existing indexes remain unchanged.

How to reproduce
trigger — this will error
trigger — this will error
-- ALTER TABLE adding the 65th index to an InnoDB table

expected output

ERROR 3652 (HY000): Too many indexes defined on table.

Fix

Audit and remove redundant indexes

Audit and remove redundant indexes
SELECT INDEX_NAME, COLUMN_NAME FROM information_schema.STATISTICS WHERE TABLE_NAME = 'your_table' AND TABLE_SCHEMA = DATABASE() ORDER BY INDEX_NAME;

Why this works

Lists all indexes for review and consolidation.

What not to do

Version notes

Sources
Official documentation ↗

MySQL 8.0 — 3652 ER_TOO_MANY_KEYS2

Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev

← All MariaDB errors