mysql-best-practices

Installation
Summary

MySQL development best practices for schema design, query optimization, and database administration.

  • Covers schema design with InnoDB as default engine, appropriate data types (DECIMAL for financial data, utf8mb4 charset), and primary key strategies including AUTO_INCREMENT and UUID storage
  • Indexing strategies including B-tree, FULLTEXT, and covering indexes with guidelines on column selectivity and composite index ordering
  • Query optimization using EXPLAIN analysis, prepared statements, keyset pagination, and avoiding common pitfalls like functions on indexed columns and implicit type conversions
  • Transaction management, JSON support with generated columns, replication monitoring, and security practices including user privilege management and SSL/TLS requirements
  • Maintenance tasks covering table analysis, optimization, integrity checks, and monitoring queries for slow performance and InnoDB status
SKILL.md

MySQL Best Practices

Core Principles

  • Design schemas with appropriate storage engines (InnoDB for most use cases)
  • Optimize queries using EXPLAIN and proper indexing
  • Use proper data types to minimize storage and improve performance
  • Implement connection pooling and query caching appropriately
  • Follow MySQL-specific security hardening practices

Schema Design

Storage Engine Selection

  • Use InnoDB as the default engine (ACID compliant, row-level locking)
  • Consider MyISAM only for read-heavy, non-transactional workloads
  • Use MEMORY engine for temporary tables with high-speed requirements
Related skills
Installs
1.6K
GitHub Stars
107
First Seen
Jan 25, 2026