mysql-patterns
面向生产后端的 MySQL 和 MariaDB 数据库结构、查询、索引、事务、复制及连接池模式。适用于设计 MySQL 或 MariaDB 结构与索引,或查询、事务或副本出现延迟的情况。
译文已校对查看英文原文
MySQL and MariaDB schema, query, indexing, transaction, replication, and connection-pool patterns for production backends. Use when designing MySQL or MariaDB schemas and indexes, or when a query, transaction, or replica lags.
适用对象:数据库。自动收录 · 待核查。
原作者说明节选
从固定版本的 SKILL.md 提取,保留原文语言。以下内容属于作者说明,本站尚未验证安装、兼容或运行结果。
查看英文原文
原文涵盖的主题
- MySQL Patterns
- Activation
- Version Check
- Schema Defaults
- Indexing
- Query Patterns
- Upsert
- Keyset Pagination
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. 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 Start by identifying the engine and version: Keep MySQL and MariaDB guidance separate when syntax differs: MySQL documents row aliases as the replacement for VALUES(col) in ON DUPLICATE KEY UPDATE; VALUES(col) is deprecated there. MariaDB documents VALUES(col) as the supported way to reference inserted values in ON DUPLICATE KEY UPDATE; use it for cross-engine compatibility. SKIP LOCKED is appropriate for queue-like work only. It skips locked rows and can return an inconsistent view, so do not use it for general accounting or in
这里只展示节选,请以完整原文和当前要求为准。
- 来源仓库
- affaan-m/ECC
- 源文件
- pi/core/skills/mysql-patterns/SKILL.md
- 固定版本
- d2ef2680594f9a17526a6e1a2e18b3d242c5d17b
来源与内容状态
本条为自动发现的元数据,尚未完成人工文档核查;适用性与运行结果待核查。
原作者:affaan-m/ECC · 原作者仓库元数据。文档核查:未核查。最近来源检查:2026-11-09T15:01:43.150Z。
分类由名称、说明与路径规则生成,分类不代表已核实适配。
许可与权利归属
MIT。第三方内容及版权归原作者,使用条件以原文为准。
许可原文 ↗本站没有因同步、复制或用户自报成功而将资源标为运行验证通过。
限制与注意事项
- 元数据收录不代表本站已经安装、适配、实测或进行安全审查。