
Mysql Muzhicaomingwang Ai Ideas
- 1 installs
- modelscope.cn
Review MySQL schema and indexes, tune slow queries with EXPLAIN, and plan replication, partitioning, and safe online schema changes.
About
A MySQL DBA skill covering schema design review, index design, query tuning, transactions, replication, and backup/restore. A developer uses it to diagnose slow queries, design keys and indexes, and plan safe migrations and high-availability setups.
- EXPLAIN/EXPLAIN ANALYZE-driven query tuning and index design
- Online schema changes via gh-ost / pt-online-schema-change
Mysql Muzhicaomingwang Ai Ideas by the numbers
- 1 all-time installs (skills.sh)
- Ranked #770 of 911 Databases skills by installs in the Skillselion catalog
- Data as of Jul 8, 2026 (Skillselion catalog sync)
npx skills add https://github.com/modelscope.cn --skill mysql-muzhicaomingwang-ai-ideasAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 1 |
|---|---|
| Repository | modelscope.cn ↗ |
What it does
Review MySQL schema and indexes, tune slow queries with EXPLAIN, and plan replication, partitioning, and safe online schema changes.
Files
mysql
Use this skill for MySQL 数据库设计、性能与运维(DBA)相关任务。
Defaults / assumptions to confirm
- MySQL version (5.7 / 8.0)
- Storage engine (InnoDB)
- Character set/collation (
utf8mb4) - Replication topology (single-primary, multi-source, etc.)
Workflow
1) Understand workload and constraints
- Read/write ratio, QPS, data size growth.
- Latency SLO, peak patterns, critical tables/queries.
2) Schema review
- Primary key strategy (avoid random PK for hot inserts unless needed; be explicit).
- Data types: avoid oversized VARCHAR/TEXT; use proper INT/BIGINT/DECIMAL.
- Nullability and defaults aligned with business meaning.
- Avoid over-normalization that forces heavy joins on critical paths.
3) Index design
- Add indexes for query patterns (WHERE, JOIN, ORDER BY, GROUP BY).
- Prefer composite indexes that match left-prefix usage.
- Avoid redundant indexes; keep write amplification in mind.
- Unique constraints where required; ensure consistent naming.
4) Query tuning
- Use
EXPLAIN/EXPLAIN ANALYZE(8.0) to verify index usage. - Watch for full table scans, filesort, temporary tables.
- Fix N+1 queries at application layer when possible.
5) Transactions & locking
- Confirm isolation level; analyze deadlocks and lock waits.
- Keep transactions short; avoid large gap locks where possible.
6) Partitioning / sharding (when needed)
- Partition only with clear pruning benefits and operational plan.
- Prefer application-level sharding with stable keys when scaling beyond single instance.
7) Operations
- Backups: logical + physical, restore drills, retention.
- Replication monitoring: lag, GTID, failover procedures.
- Online schema changes:
gh-ost/pt-online-schema-changewhere appropriate.
Outputs
- Index plan: which queries, which indexes, expected benefit, trade-offs.
- Migration plan: DDL, rollout steps, backout plan, verification queries.
- Performance report: top queries, proposed fixes, metrics to watch.