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.
.claude/skills/davila7-supabase-postgres-best-practices/SKILL.md| 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
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→fail | 22,896 | 12,083 | -47% | 1 | 1 | 0% | 4,144 | 2,601 | -37% | 0 | 0 | — |
case-02 | pass→pass | 11,293 | 5,556 | -51% | 1 | 1 | 0% | 1,801 | 1,236 | -31% | 0 | 0 | — |
case-03 | fail→pass | 8,986 | 2,590 | -71% | 1 | 1 | 0% | 1,296 | 748 | -42% | 0 | 0 | — |
case-04 | fail→pass | 10,860 | 1,789 | -84% | 1 | 1 | 0% | 1,888 | 618 | -67% | 0 | 0 | — |
case-05 | fail→pass | 15,079 | 3,155 | -79% | 1 | 1 | 0% | 2,280 | 518 | -77% | 0 | 0 | — |
case-06 | fail→pass | 9,987 | 3,062 | -69% | 1 | 1 | 0% | 1,690 | 595 | -65% | 0 | 0 | — |
case-07 | fail→pass | 11,973 | 1,729 | -86% | 1 | 1 | 0% | 2,011 | 630 | -69% | 0 | 0 | — |
case-08 | fail→pass | 9,800 | 2,088 | -79% | 1 | 1 | 0% | 1,664 | 648 | -61% | 0 | 0 | — |
case-09 | fail→pass | 6,575 | 2,115 | -68% | 1 | 1 | 0% | 963 | 661 | -31% | 0 | 0 | — |
case-10 | fail→pass | 7,960 | 1,681 | -79% | 1 | 1 | 0% | 1,204 | 555 | -54% | 0 | 0 | — |
case-11 | fail→pass | 11,853 | 2,604 | -78% | 1 | 1 | 0% | 1,951 | 689 | -65% | 0 | 0 | — |
case-12 | fail→pass | 8,494 | 1,966 | -77% | 1 | 1 | 0% | 1,293 | 646 | -50% | 0 | 0 | — |
case-13 | pass→pass | 11,830 | 1,969 | -83% | 1 | 1 | 0% | 1,770 | 566 | -68% | 0 | 0 | — |
case-14 | pass→pass | 8,440 | 1,586 | -81% | 1 | 1 | 0% | 1,325 | 555 | -58% | 0 | 0 | — |
case-15 | fail→pass | 12,639 | 1,927 | -85% | 1 | 1 | 0% | 2,011 | 623 | -69% | 0 | 0 | — |
case-16 | fail→pass | 14,288 | 2,302 | -84% | 1 | 1 | 0% | 2,239 | 692 | -69% | 0 | 0 | — |
case-17 | fail→pass | 9,243 | 2,492 | -73% | 1 | 1 | 0% | 1,368 | 731 | -47% | 0 | 0 | — |
case-18 | pass→pass | 13,207 | 2,332 | -82% | 1 | 1 | 0% | 2,357 | 817 | -65% | 0 | 0 | — |
case-19 | pass→pass | 21,341 | 7,482 | -65% | 1 | 1 | 0% | 3,470 | 1,606 | -54% | 0 | 0 | — |
case-20 | pass→pass | 5,882 | 4,602 | -22% | 1 | 1 | 0% | 882 | 1,261 | +43% | 0 | 0 | — |
case-21 | pass→pass | 16,162 | 12,437 | -23% | 1 | 1 | 0% | 2,996 | 2,416 | -19% | 0 | 0 | — |
case-22 | pass→pass | 7,887 | 6,461 | -18% | 1 | 1 | 0% | 1,437 | 1,544 | +7% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +59 percentage points is the difference between those two pass rates over the 22 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.