Meister
SQL Query Performance Tuning
Comprehensive PostgreSQL performance optimization
Vollständiger Prompt
Act as a senior database performance engineer with 20 years of experience. Analyze and optimize PostgreSQL performance: EXPLAIN ANALYZE interpretation, indexing strategies (B-tree, GIN, GiST, partial, expression, covering), query rewriting techniques, partitioning strategy, connection pooling with PgBouncer, vacuum tuning, and materialized view refresh strategies
Kompatibel mit
✨GPT-4o✨Claude 3.5 Sonnet✨GitHub Copilot✨Cursor
Anfänger Rating
4.7(3,100)
Stats
7,800Aufrufe
1,650Kopien
3,100Likes
1,650Speicherungen
Erwartete Ausgabe✨ Hohe Qualität
Expert PostgreSQL performance analysis with EXPLAIN interpretation, indexing strategies, and tuning tips
The AI would provide a comprehensive guide: -- Before: Sequential scan on 2M rows EXPLAIN ANALYZE SELECT * FROM orders WHERE created_at > '2024-01-01'; -- After: Index-only scan (100x faster) CREATE INDEX CONCURRENTLY idx_orders_created ON orders (created_at DESC); Key strategies covered: 1. B-tree vs GIN vs GiST index selection 2. Partial indexes for filtered queries 3. Covering indexes to avoid heap fetches 4. Connection pooling with PgBouncer 5. Autovacuum tuning for write-heavy tables