supabase-postgres-best-practices

Review Supabase SQL queries and schema for Postgres performance issues.

Updated May 17, 2026
One-click install
npx skills add https://github.com/ohdaveed/director-hearing-manager --skill supabase-postgres-best-practices-ohdaveed
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: supabase-postgres-best-practices
Source: https://github.com/ohdaveed/director-hearing-manager/tree/main/.agents/skills/supabase-postgres-best-practices
Command: npx skills add https://github.com/ohdaveed/director-hearing-manager --skill supabase-postgres-best-practices-ohdaveed

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It helps developers prevent slow queries, unstable performance, and inefficient schema choices by providing actionable Postgres optimization guidance tailored for Supabase environments.

Core Features & Use Cases

  • Prioritized performance rules: Organizes guidance into eight categories ranked by impact, covering query performance, connections, security/RLS, schema design, locking, access patterns, diagnostics, and advanced features.
  • Correct vs. incorrect SQL patterns: Each rule includes what to do, what to avoid, and why, with concrete SQL examples.
  • EXPLAIN/metrics-driven tuning: Where applicable, includes query plan analysis and performance metrics to validate improvements.
  • Supabase-specific guidance: Incorporates Supabase and RLS considerations so recommendations map directly to real production setups.

Quick Start

Ask the AI to review your SQL and suggest concrete index, join, and schema changes aligned with the highest-impact categories from the supabase-postgres-best-practices rules.

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

To optimize slow Postgres queries in Supabase, apply prioritized performance rules covering query writing, targeted indexing, and schema design adjustments to eliminate inefficient database access patterns.

What are the best practices for designing Supabase RLS policies without hurting performance?

Design Supabase RLS policies by following security and access pattern rules that prevent row-level security from triggering sequential scans, ensuring policy conditions map efficiently to database indexes.

How do I use EXPLAIN ANALYZE to fix slow Supabase database queries?

Use EXPLAIN ANALYZE to inspect query plans and performance metrics, validating whether your index and schema design changes successfully improved database execution efficiency and resolved slow queries.

Does this Postgres optimization guidance apply to connection management and locking issues in Supabase?

Yes, this Postgres optimization guidance addresses Supabase connection management and locking issues, providing concrete SQL examples and rules to stabilize database performance across eight prioritized categories.

What is the best way to structure a Supabase schema for high-performance queries?

The best way to structure a Supabase schema for high-performance queries is to follow prioritized schema design rules that correct inefficient access patterns, preventing slow queries through proper indexing and join strategies.