mysql-patterns

Standardize MySQL and MariaDB schema design, query optimization, and transaction management.

Updated Jan 30, 2026
One-click install
npx skills add https://github.com/ThejanaJayalath/Niolla-PM-system --skill mysql-patterns-thejanajayalath
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mysql-patterns
Source: https://github.com/ThejanaJayalath/Niolla-PM-system/tree/main/.cursor/skills/mysql-patterns
Command: npx skills add https://github.com/ThejanaJayalath/Niolla-PM-system --skill mysql-patterns-thejanajayalath

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill addresses the complexity of managing production-grade MySQL and MariaDB databases by providing standardized patterns for schema design, query optimization, and transaction safety.

Core Features & Use Cases

  • Schema & Indexing: Provides best practices for surrogate keys, data types, and composite index ordering to ensure high performance.
  • Query Optimization: Offers patterns for keyset pagination, upserts, and full-text search to avoid common performance pitfalls like deep offsets or table scans.
  • Operational Safety: Includes guidance on connection pooling, transaction management, and security configurations to prevent deadlocks and unauthorized access.

Quick Start

Use the mysql-patterns skill to review my current schema design and suggest indexes for the orders table.

Frequently Asked Questions about mysql-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
What are the best practices for MySQL schema design and composite index ordering?

MySQL schema design best practices involve using surrogate keys, selecting optimal data types, and applying proper composite index ordering to ensure high performance in production environments.

How do I optimize slow MySQL queries and avoid deep offset table scans?

Optimize slow MySQL queries by implementing keyset pagination patterns and utilizing upserts, which prevents common performance pitfalls associated with deep offsets and full table scans.

How do I prevent deadlocks during high-concurrency MySQL transaction management?

Prevent deadlocks during high-concurrency MySQL transaction management by applying standardized patterns for connection pooling, transaction safety, and security configurations.

Does this database optimization approach work for both MySQL and MariaDB engines?

Yes, this database optimization approach works for both MySQL and MariaDB engines, requiring adherence to engine-specific syntax and performance best practices for high-concurrency workloads.

What is the best way to plan a MySQL database migration and architecture review?

The best way to plan a MySQL database migration and architecture review is to standardize schema design, query optimization, and transaction safety for production environments.