Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Postgres performance optimization and best practices from Supabase. Use this skill when writing, reviewing, or optimizing Postgres queries, schema designs, or database configurations.
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-03 | ✗→✓ | ▲ Improved | -42% | 0% |
| case-04 | ✗→✓ | ▲ Improved | -67% | 0% |
| case-05 | ✗→✓ | ▲ Improved | -77% | 0% |
| case-06 | ✗→✓ | ▲ Improved | -65% | 0% |
| case-07 | ✗→✓ | ▲ Improved | -69% | 0% |
Comprehensive performance optimization guide for Postgres, maintained by Supabase. Contains rules across 8 categories, prioritized by impact to guide automated query optimization and schema design.
Reference these guidelines when:
| Priority | Category | Impact | Prefix | |----------|----------|--------|--------| | 1 | Query Performance | CRITICAL | query- | | 2 | Connection Management | CRITICAL | conn- | | 3 | Security & RLS | CRITICAL | security- | | 4 | Schema Design | HIGH | schema- | | 5 | Concurrency & Locking | MEDIUM-HIGH | lock- | | 6 | Data Access Patterns | MEDIUM | data- | | 7 | Monitoring & Diagnostics | LOW-MEDIUM | monitor- | | 8 | Advanced Features | LOW | advanced- |
Read individual rule files for detailed explanations and SQL examples:
rules/query-missing-indexes.md
rules/schema-partial-indexes.md
rules/_sections.mdEach rule file contains:
For the complete guide with all rules expanded: AGENTS.md
Other measured skills in the registry, with their headline benchmark lift.