sql-databases

Optimize SQL queries and schema design for PostgreSQL and MySQL.

5|1|Updated Nov 18, 2025
One-click install
npx skills add https://github.com/pluginagentmarketplace/custom-plugin-data-engineer --skill sql-databases
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sql-databases
Source: https://github.com/pluginagentmarketplace/custom-plugin-data-engineer/tree/main/skills/sql-databases
Command: npx skills add https://github.com/pluginagentmarketplace/custom-plugin-data-engineer --skill sql-databases

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires yaml, and includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

SQL-databases skill solves production SQL performance problems by enabling efficient query design and optimization.

Core Features & Use Cases

  • Query optimization & execution: Use EXPLAIN ANALYZE and indexing patterns to accelerate critical queries in production.
  • Schema design & partitioning: Design normalized schemas and partition large data for scalability and reliability.
  • Indexing patterns: Implement composite, partial, and functional indexes to support common workloads.
  • Use Case: For dashboards with monthly aggregates, apply window functions and partitioning to speed up reports.

Quick Start

Start by connecting to a PostgreSQL 16+ or MySQL 8.0+ instance and applying the examples provided in this skill to optimize a representative workload.

Frequently Asked Questions about sql-databases

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

FAQPage Schema
How do I optimize slow PostgreSQL queries in production?

Optimize slow PostgreSQL queries by applying EXPLAIN ANALYZE to identify bottlenecks and implementing composite, partial, or functional indexing patterns to accelerate critical production workloads.

What is the best way to design a scalable schema for large relational databases?

Design scalable relational database schemas by normalizing data structures and applying partitioning strategies to large tables, ensuring reliability and performance for real-world workloads.

How do window functions speed up monthly aggregate dashboards?

Window functions accelerate monthly aggregate dashboards by performing calculations across related rows without self-joins, combining with partitioning to speed up report generation.

Does this SQL optimization approach work with MySQL 8.0+ instances?

Yes, the SQL optimization patterns and indexing strategies support both PostgreSQL 16+ and MySQL 8.0+ instances, applying reproducible validation scripts to ensure reliable data pipelines.

When should I use partitioning instead of indexing for query optimization?

Use partitioning for large datasets to improve scalability and maintenance, while indexing patterns accelerate specific query workloads; combining both ensures maintainable and performant data pipelines.