perf-database

Analyze EXPLAIN plans and optimize SQLAlchemy database performance bottlenecks.

1|Updated Dec 22, 2025
One-click install
npx skills add https://github.com/CybLow/pypaginate --skill perf-database
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: perf-database
Source: https://github.com/CybLow/pypaginate/tree/main/.opencode/skills/perf-database
Command: npx skills add https://github.com/CybLow/pypaginate --skill perf-database

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Database performance bottlenecks can throttle modern applications. This Skill provides a structured approach to analyze, tune, and optimize SQL workloads, connection pools, and ORM usage to improve latency and throughput.

Core Features & Use Cases

  • Analyze queries with EXPLAIN to identify bottlenecks and select more efficient plans.
  • Tune connection pools and engine configuration to maximize throughput and reduce latency.
  • Optimize batch operations, streaming large results, and common SQLAlchemy patterns to minimize N+1 queries and data access costs.
  • Use cases include high-traffic web apps, data processing pipelines, and microservices with heavy database interaction.

Quick Start

Run perf-database to profile your app's database workload and generate optimization recommendations.

Frequently Asked Questions about perf-database

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

FAQPage Schema
How do I optimize SQLAlchemy queries to reduce database latency?

Optimize SQLAlchemy queries by using EXPLAIN analysis to identify execution plan bottlenecks, configuring connection pools, and applying batch operations to minimize N+1 query data access costs for lower latency.

What is the best way to analyze database performance bottlenecks in high-traffic apps?

Analyzing database performance bottlenecks involves profiling query workloads with EXPLAIN, tuning connection pool engine configuration, and optimizing data access patterns to maximize throughput in high-traffic web apps and microservices.

How do I fix N+1 query problems in an ORM-heavy workload?

Fix N+1 query problems in ORM-heavy workloads by applying SQLAlchemy optimization patterns like batch operations and streaming large results, which minimize data access costs and reduce redundant database round-trips.

Does this database optimization approach work with raw SQL workflows or only ORMs?

This database optimization approach works with both raw SQL workflows and ORM-heavy workloads, supporting EXPLAIN-based analysis, connection pooling configuration, and batch operations across SQLAlchemy-based apps and direct SQL interactions.

When should I tune connection pooling for database throughput?

Tune connection pooling for database throughput when high-traffic web apps, data processing pipelines, or microservices experience latency throttling, requiring engine configuration adjustments to maximize connection reuse and overall throughput.