db-optimization

Identify and optimize slow database queries with EXPLAIN ANALYZE profiling.

3|Updated May 28, 2026
One-click install
npx skills add https://github.com/mahg-es/araya --skill db-optimization
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: db-optimization
Source: https://github.com/mahg-es/araya/tree/main/skills/db-optimization
Command: npx skills add https://github.com/mahg-es/araya --skill db-optimization

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps developers and DBAs reduce query latency and improve throughput by identifying bottlenecks, rewriting queries, and applying indexing and configuration changes.

Core Features & Use Cases

  • Automated query profiling and bottleneck detection
  • Indexing strategy design and query rewriting guidance
  • Configuration tuning recommendations for read-heavy workloads

Quick Start

Analyze your slow queries and generate an optimization plan with indexing and query rewrites.

Frequently Asked Questions about db-optimization

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

FAQPage Schema
How do I find slow database queries and improve PostgreSQL response times?

To improve database query response times, use query profiling like EXPLAIN ANALYZE to detect bottlenecks and identify slow queries. This pinpoints complex joins and read/write contention across development, testing, and production environments for measurable before/after results.

What's the best way to design indexing strategies for high read/write contention workloads?

Designing indexing strategies for high read/write contention workloads involves analyzing query execution plans to apply targeted indexing and query rewrites. This reduces query latency and improves throughput by directly addressing data growth and complex join bottlenecks.

How does query profiling with EXPLAIN ANALYZE work for optimizing database throughput?

Query profiling with EXPLAIN ANALYZE works for optimizing database throughput by executing queries to reveal execution bottlenecks and latency sources. It provides measurable before/after results to guide configuration tuning and indexing recommendations for complex workloads.

Can I apply database configuration tuning for read-heavy workloads in a production environment?

Yes, you can apply database configuration tuning for read-heavy workloads in production environments. The optimization workflow supports configuration changes and query rewriting guidance across development, testing, and production to safely improve throughput and reduce latency.

Why does database query latency increase with large data growth and complex joins?

Database query latency increases with large data growth and complex joins due to inefficient execution plans and read/write contention. Identifying these bottlenecks through query profiling allows you to apply indexing and configuration tuning, restoring optimal response times.