MariaDB
Installation
SKILL.md
Character Set
- Always use
utf8mb4for tables and connections—full Unicode including emoji utf8mb4_unicode_cifor proper linguistic sorting,utf8mb4_binfor byte comparison- Set connection charset:
SET NAMES utf8mb4or in connection string - Collation mismatch in JOINs forces conversion—kills index usage
Indexing
- TEXT/BLOB columns need prefix length:
INDEX (description(100)) - Composite index order matters—
(a, b)servesWHERE a=?but notWHERE b=? - Foreign keys auto-create index on child table—but verify with
SHOW INDEX - Covering indexes: include all SELECT columns to avoid table lookup