database-optimizer

Analyze SQL queries and schema design for PostgreSQL, MySQL, Supabase, and PlanetScale.

Updated Mar 16, 2026
One-click install
npx skills add https://github.com/Likas07/t3code-skills --skill database-optimizer-likas07
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: database-optimizer
Source: https://github.com/Likas07/t3code-skills/tree/main/skills/database-optimizer
Command: npx skills add https://github.com/Likas07/t3code-skills --skill database-optimizer-likas07

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill addresses slow database performance, inefficient schema designs, and complex query issues, ensuring applications run smoothly and scale effectively.

Core Features & Use Cases

  • Schema Design: Creates optimized database schemas for performance and scalability.
  • Query Optimization: Analyzes and rewrites SQL queries for maximum efficiency using EXPLAIN ANALYZE.
  • Indexing Strategies: Implements appropriate indexing to speed up data retrieval.
  • Use Case: A web application is experiencing slow load times due to inefficient database queries. This Skill can analyze the slow queries, suggest and implement better indexing, and optimize the SQL for faster execution.

Quick Start

Analyze the performance of the attached SQL query using EXPLAIN ANALYZE.

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 database queries using EXPLAIN ANALYZE?

To optimize slow database queries, analyze query execution plans using EXPLAIN ANALYZE to identify bottlenecks, then rewrite SQL and implement indexing strategies for maximum efficiency. This process targets inefficient data retrieval directly.

What is the best way to fix N+1 query problems in PostgreSQL?

Fixing N+1 query problems in PostgreSQL requires analyzing query execution plans to detect redundant data retrieval, then rewriting the SQL to use efficient joins and implementing appropriate indexing strategies to speed up data access.

Can I use this database optimization approach with Supabase and PlanetScale?

Yes, this database optimization approach works with Supabase and PlanetScale. It analyzes schema design, query execution plans, and indexing strategies across PostgreSQL, MySQL, Supabase, and PlanetScale to solve slow query performance issues.

How do I design an optimized database schema for scalability?

Designing an optimized database schema for scalability involves structuring tables to support efficient data retrieval and analyzing query execution plans. Proper schema design combined with targeted indexing strategies ensures applications run smoothly at scale.

Why does my SQL query execution plan show slow data retrieval?

Your SQL query execution plan shows slow data retrieval due to inefficient schema design, missing indexes, or N+1 query problems. Analyzing the plan with EXPLAIN ANALYZE highlights these bottlenecks so you can rewrite queries and implement indexing strategies.