supabase-postgres-best-practices

Provides PostgreSQL optimization and best-practice recommendations for developers.

137|29|Updated Feb 4, 2026
One-click install
npx skills add https://github.com/happycapy-ai/Happycapy-skills --skill supabase-postgres-best-practices-happycapy-ai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: supabase-postgres-best-practices
Source: https://github.com/happycapy-ai/Happycapy-skills/tree/main/skills/supabase-postgres-best-practices
Command: npx skills add https://github.com/happycapy-ai/Happycapy-skills --skill supabase-postgres-best-practices-happycapy-ai

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill addresses common performance bottlenecks and best practice violations in PostgreSQL databases, helping developers write more efficient queries, design better schemas, and manage connections effectively.

Core Features & Use Cases

  • Query Optimization: Identifies and provides solutions for slow queries, missing indexes, and inefficient query plans.
  • Schema Design Guidance: Offers best practices for data types, primary keys, partitioning, and foreign key constraints.
  • Connection Management: Provides strategies for connection pooling and setting appropriate limits to ensure database stability.
  • Use Case: A developer is experiencing slow load times on their application's dashboard. They can use this Skill to analyze their SQL queries, identify missing indexes on frequently filtered columns, and implement composite indexes for multi-column filters, leading to significant performance improvements.

Quick Start

Use the supabase-postgres-best-practices skill to find recommendations for optimizing slow SQL queries.

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?

Schema design in Postgres requires careful selection of data types, primary keys, and foreign key constraints. Implementing partitioning strategies further optimizes data access patterns and ensures long-term database structural efficiency.

What is the best way to manage Postgres connection pooling?

Postgres connection management involves implementing connection pooling strategies and setting appropriate connection limits. This ensures database stability under heavy load and prevents connection exhaustion during concurrent application requests.

How do I fix missing indexes causing slow SQL load times?

Missing indexes causing slow SQL load times are fixed by adding composite indexes for multi-column filters. Analyzing query plans helps identify these inefficiencies and guides the correct index creation for frequently filtered database columns.

What are the best practices for Postgres schema design and data types?

Postgres schema design best practices involve selecting appropriate data types, primary keys, and foreign key constraints. Utilizing partitioning for large datasets further optimizes data access patterns and ensures efficient database queries.

When should I use partitioning in my PostgreSQL database?

Partitioning in a PostgreSQL database should be used during schema design to manage large datasets efficiently. It optimizes data access patterns by splitting tables into smaller, more manageable pieces, improving query performance.

Does incorrect SQL syntax impact Postgres query performance?

Incorrect SQL syntax significantly impacts Postgres query performance by generating inefficient execution plans. Comparing incorrect versus correct SQL examples helps identify anti-patterns and implement optimizations for better database response times.