
Mysql Patterns
This is your reference when you're past the MySQL tutorial stage and need production-ready patterns for schema design, indexing, transactions, and connection pools. It covers the version divergence between MySQL and MariaDB (like the VALUES() deprecation in upserts), shows you how to build composite indexes that actually get used, and walks through keyset pagination, queue-style job claiming with SKIP LOCKED, and deadlock prevention. The schema defaults table alone will save you from common mistakes like using FLOAT for money or utf8 instead of utf8mb4. If you're debugging slow queries, tuning connection pools, or reviewing a migration before it locks a production table for twenty minutes, this gives you the patterns and EXPLAIN checklist you need.
- skills.sh installs
- 5.7K
- GitHub stars
- 300.3K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add affaan-m/ecc --skill mysql-patterns --agent claude-codeInstalls into .claude/skills of the current project.
Files
MySQL Patterns
Use this skill when working on MySQL or MariaDB schema design, migrations, slow-query investigation, queue-style transactions, connection pools, or production database configuration. Prefer exact version checks before applying a feature-specific pattern because MySQL and MariaDB have diverged in several SQL details.
Activation
- Designing MySQL or MariaDB tables, indexes, and constraints
- Reviewing migrations before they run on large production tables
- Debugging slow queries, lock waits, deadlocks, or connection exhaustion
- Adding keyset pagination, upserts, full-text search, JSON columns, or queues
- Configuring application connection pools, read replicas, TLS, or slow logs
Version Check
Start by identifying the engine and version:
SELECT VERSION();
SHOW VARIABLES LIKE 'version_comment';
Keep MySQL and MariaDB guidance separate when syntax differs:
Sponsors
Details
- Repository
- github.com/affaan-m/ecc
- Categories
- Backend & APIs, Databases
- First seen
- Jul 14, 2026
More from affaan-m/ecc
All 263- Production Audit5.7K
- Documentation Lookup5.7K
- Make Interfaces Feel Better5.7K
- Windows Desktop E2e5.7K
- Motion Advanced5.6K
- Cost Aware Llm Pipeline5.6K
- Mcp Server Patterns5.6K
- Council5.6K
- Fal Ai Media5.6K
- Jpa Patterns5.6K
- Mle Workflow5.6K
- Compose Multiplatform Patterns5.6K
- Llm Trading Agent Security5.6K
- Swiftui Patterns5.6K
- Github Ops5.6K
- Autonomous Loops5.6K
- Data Scraper Agent5.6K
- Springboot Verification5.6K
- Django Verification5.6K
- Django Celery5.6K
- Dotnet Patterns5.6K
- Blueprint5.5K
- Ecc Guide5.5K
- Code Tour5.5K