sql-database-patterns

Provide schema design, query optimization, and maintenance patterns for relational and NoSQL databases.

2|Updated Mar 19, 2026
One-click install
npx skills add https://github.com/alex-voloshin-dev/ai-skills --skill sql-database-patterns
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sql-database-patterns
Source: https://github.com/alex-voloshin-dev/ai-skills/tree/main/plugin/skills/sql-database-patterns
Command: npx skills add https://github.com/alex-voloshin-dev/ai-skills --skill sql-database-patterns

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill resolves architectural uncertainty and performance bottlenecks by providing standardized, production-proven patterns for schema design, query optimization, and database maintenance across both relational and NoSQL engines.

Core Features & Use Cases

  • Schema & Indexing Strategy: Provides best practices for normalization, partitioning, and index selection (B-tree, GIN, GiST, BRIN) to ensure high-performance data access.
  • Performance Tuning: Offers actionable guidance for diagnosing slow queries, managing replication lag, and configuring database-specific parameters for PostgreSQL, MySQL, and NoSQL systems.
  • Use Case: When designing a new multi-tenant application, use this skill to determine the optimal partitioning strategy and indexing approach to maintain low latency as the dataset grows.

Quick Start

Use the sql-database-patterns skill to review the proposed schema for the new user-activity table and suggest appropriate indexing strategies.

Frequently Asked Questions about sql-database-patterns

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

FAQPage Schema
How do I design a database schema for a multi-tenant application?

Designing a database schema for a multi-tenant application requires optimal partitioning strategies and normalization patterns to maintain low latency. This approach provides standardized patterns for schema design, ensuring high-performance data access as your dataset grows.

What is the best way to optimize slow SQL queries in PostgreSQL?

Optimizing slow SQL queries in PostgreSQL involves diagnosing performance bottlenecks and applying appropriate index selection like B-tree, GIN, or GiST. This provides actionable guidance for query optimization and configuring database parameters for better performance.

When do I need partitioning and specific indexes for database optimization?

You need database partitioning and specific indexes like BRIN or GIN when managing large datasets requiring high-performance data access. This provides standardized architectural patterns to resolve performance bottlenecks and ensure low latency across relational engines.

Does this approach work with NoSQL access pattern modeling?

Yes, this approach works with NoSQL access pattern modeling by providing comprehensive engineering patterns for NoSQL schema design. It supports diverse engine types, ensuring high-availability and performance-tuned architectures across both relational and NoSQL systems.

How do I manage replication lag and maintain database infrastructure?

Managing replication lag and maintaining database infrastructure involves configuring database-specific parameters and planning replication topology. This offers actionable guidance for diagnosing slow queries and managing replication to ensure high-availability database architectures.

What are the limitations of using standard indexing for high-availability databases?

Standard indexing limitations for high-availability databases include insufficient performance tuning for complex access patterns, requiring specialized indexes like GIN or GiST. This provides infrastructure maintenance patterns to address replication lag and ensure secure, optimized architectures.