Database Optimizer

Optimize PostgreSQL, MySQL, Supabase, and PlanetScale databases with schema design, query tuning, and indexing.

Updated Apr 16, 2026
One-click install
npx skills add https://github.com/jc180105/.opencode --skill database-optimizer-jc180105
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Database Optimizer
Source: https://github.com/jc180105/.opencode/tree/main/.opencode/skills/engineering-database-optimizer
Command: npx skills add https://github.com/jc180105/.opencode --skill database-optimizer-jc180105

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps teams achieve reliable, high-performance database systems by designing scalable schemas, optimizing queries, and implementing robust indexing and migration practices.

Core Features & Use Cases

  • Schema design for scalable databases with appropriate constraints, normalization vs denormalization decisions, and effective indexing.
  • Query optimization using EXPLAIN ANALYZE, advanced indexing strategies (B-tree, GiST, GIN), and plan interpretation to reduce latency.
  • Safe migrations and deployment patterns, including reversible changes and zero-downtime migrations across PostgreSQL, MySQL, and cloud platforms like Supabase and PlanetScale.

Quick Start

Provide a baseline database schema for a core transactional app, run EXPLAIN ANALYZE on key queries, and iteratively add indexes to improve plan costs.

Frequently Asked Questions about Database Optimizer

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

FAQPage Schema
How do I optimize slow PostgreSQL queries using EXPLAIN ANALYZE?

To optimize slow PostgreSQL queries, run EXPLAIN ANALYZE to interpret execution plans and iteratively apply advanced indexing strategies like B-tree, GiST, or GIN to reduce latency and plan costs.

What is the best way to design a scalable database schema for high traffic?

Designing a scalable database schema requires balancing normalization and denormalization, applying appropriate constraints, and implementing effective indexing to ensure fast query performance under high traffic.

Can I perform zero-downtime database migrations on Supabase or PlanetScale?

Yes, you can perform zero-downtime database migrations on Supabase and PlanetScale by using safe deployment patterns that enforce reversible changes to prevent data loss and service disruption.

Does safe connection pooling work with both MySQL and PostgreSQL?

Safe connection pooling is enforced as a core requirement across both PostgreSQL and MySQL, ensuring robust and reliable database connections for high-performance transactional applications.

How do I add indexes to an existing database without causing downtime?

Adding indexes without downtime involves running safe migrations using reversible deployment patterns, validating changes with EXPLAIN ANALYZE, and utilizing zero-downtime migration strategies supported by PostgreSQL and MySQL.