sql-optimization

Optimize SQL queries and schemas for PostgreSQL, MySQL, and SQLite.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/Ai-Whisperers/infrastructure-cost-tracker --skill sql-optimization-ai-whisperers
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sql-optimization
Source: https://github.com/Ai-Whisperers/infrastructure-cost-tracker/tree/main/openclaw-config/skills/sql-optimization
Command: npx skills add https://github.com/Ai-Whisperers/infrastructure-cost-tracker --skill sql-optimization-ai-whisperers

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps users write more efficient SQL queries, design better database schemas, and troubleshoot performance bottlenecks, leading to faster and more reliable database operations.

Core Features & Use Cases

  • Query Optimization: Provides examples and best practices for optimizing SELECT, JOIN, and aggregation queries.
  • Schema Design: Guides users on normalization, appropriate data types, and constraint usage.
  • Performance Monitoring: Shows how to identify slow queries and analyze execution plans.
  • Use Case: A developer is experiencing slow load times on a web application. They can use this Skill to analyze their database queries, identify inefficient joins or missing indexes, and implement optimizations.

Quick Start

Use the sql-optimization skill to create an index on the 'email' column of the 'users' table.

Frequently Asked Questions about sql-optimization

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

FAQPage Schema
How do I optimize slow SQL queries in PostgreSQL, MySQL, or SQLite?

To optimize slow SQL queries, you can analyze execution plans and apply query tuning best practices to improve performance across PostgreSQL, MySQL, and SQLite. This includes fixing inefficient joins, adding missing indexes, and restructuring aggregations.

What are the best database schema design practices for performance?

Good database schema design for performance involves proper normalization, selecting appropriate data types, and implementing database constraints. These practices reduce data redundancy, ensure data integrity, and make query execution more efficient.

How do I identify slow queries and analyze SQL execution plans?

You identify slow queries and analyze SQL execution plans through database performance monitoring. By reading execution plans, you can pinpoint bottlenecks like missing indexes or inefficient table scans causing slow application load times.

Do I need to understand execution plans to tune my database queries?

Yes, understanding SQL execution plans is required for effective query tuning and database optimization. Analyzing execution plans allows you to see how the database engine processes queries and identify where to apply indexes or rewrite joins.

What is the best way to add indexes for database optimization?

The best way to add indexes for database optimization is by targeting columns used in WHERE clauses, JOIN conditions, and sorting operations. Creating targeted indexes drastically reduces table scanning and speeds up data retrieval.

Why does my web application have slow load times despite optimized queries?

Slow web application load times can persist despite basic query optimization due to poor database schema normalization or inappropriate data type selection. Reviewing constraint implementation and schema design helps resolve underlying structural bottlenecks.