supabase-postgres-best-practices

Analyze Supabase Postgres queries, indexing, and schema design for optimization.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Supabase projects often suffer from under-optimized Postgres configurations, slow queries, and poorly chosen indexes. This skill provides a consolidated guide of best practices to diagnose and fix these issues efficiently.

Core Features & Use Cases

  • 8 category coverage (Query Performance, Connection Management, Security & RLS, Schema Design, Concurrency & Locking, Data Access Patterns, Monitoring & Diagnostics, Advanced Features) with concrete rules and examples.
  • Use cases include query tuning, index design, partitioning, configuration tuning, and implementing effective RLS.
  • Real-world example: optimize a slow catalog query by adding a multi-column index and evaluating plan analysis.

Quick Start

Apply the top-priority optimization rules to a staging database to verify performance gains.

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 slow Supabase Postgres queries?

Optimize slow Supabase Postgres queries by analyzing query patterns, evaluating execution plans, and applying targeted indexes. This skill provides concrete rules for schema design and plan analysis to improve database speed and reliability.

What is the best way to design indexes for Supabase Postgres?

Design indexes by analyzing query patterns and applying multi-column indexes for slow catalog queries. This skill provides concrete rules and real-world examples to guide index selection and improve Postgres query speed.

How does connection management affect Supabase Postgres performance?

Connection management affects performance by preventing pool exhaustion and concurrency bottlenecks. This skill provides concrete rules for managing connections, locking, and data access patterns to maintain database reliability under load.

Can I use these Postgres best practices for implementing Row Level Security?

Yes, you can use these practices to implement effective Row Level Security (RLS). The skill covers Security & RLS as one of eight categories, providing concrete rules to ensure data access patterns remain performant.

When do I need partitioning for Supabase Postgres schema design?

You need partitioning when optimizing schema design for large datasets and specific data access patterns. This skill includes partitioning and configuration tuning rules to guide advanced Postgres schema optimization.

What are the limitations when tuning Supabase Postgres configurations?

Limitations when tuning Supabase Postgres configurations include potential locking and concurrency issues if applied incorrectly. Always apply top-priority optimization rules to a staging database first to verify performance gains.