supabase-postgres-best-practices

Optimize PostgreSQL query execution, connection pooling, and schema architecture.

Updated Feb 26, 2026
One-click install
npx skills add https://github.com/dabblersport/webapp --skill supabase-postgres-best-practices-dabblersport
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: supabase-postgres-best-practices
Source: https://github.com/dabblersport/webapp/tree/main/.agents/skills/supabase-postgres-best-practices
Command: npx skills add https://github.com/dabblersport/webapp --skill supabase-postgres-best-practices-dabblersport

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This skill addresses database performance bottlenecks, inefficient query patterns, and suboptimal schema designs that lead to slow application response times and resource exhaustion.

Core Features & Use Cases

  • Performance Optimization: Provides actionable rules for query tuning, index selection, and connection management.
  • Schema Best Practices: Offers guidance on data types, partitioning, and constraint implementation to ensure long-term database health.
  • Use Case: When a production query is performing a sequential scan on a large table, use this skill to identify the correct index type or query rewrite to reduce execution time by orders of magnitude.

Quick Start

Use the supabase-postgres-best-practices skill to analyze the provided SQL query and suggest performance improvements based on the reference guidelines.

Frequently Asked Questions about supabase-postgres-best-practices

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

FAQPage Schema
How do I optimize PostgreSQL queries that are performing slow sequential scans?

To optimize PostgreSQL queries causing slow sequential scans, you can apply expert rules for index selection and query rewriting to reduce execution time by orders of magnitude. This skill identifies the correct index type to replace sequential scans on large tables.

What's the best way to manage connection pooling for a Supabase database?

The best way to manage connection pooling for a Supabase database is to apply actionable rules for connection management. This ensures high availability and low latency during database performance tuning and infrastructure scaling.

How does schema design affect PostgreSQL performance over time?

Schema design affects PostgreSQL performance by dictating data types, partitioning, and constraint implementation. Applying schema best practices ensures long-term database health and prevents inefficient query patterns that cause resource exhaustion.

How do I choose the right index type for my PostgreSQL tables?

Choosing the right index type for PostgreSQL tables involves analyzing query execution plans and applying expert-curated optimization rules. This skill guides index selection to resolve performance bottlenecks and improve application response times.

Can I use these optimization rules for standard Postgres or only Supabase?

You can use these optimization rules for both standard Postgres and Supabase environments. The performance tuning, connection pooling, and schema architecture guidance applies to database development and infrastructure scaling across both platforms.

Why does my Supabase RLS policy cause query performance issues?

Supabase RLS policies can cause query performance issues when not optimized correctly. This skill provides specific rules for RLS policy optimization to ensure that row-level security does not lead to slow application response times.