postgres-best-practices

Identify and apply Postgres performance best practices for Supabase deployments.

Updated Apr 12, 2026
One-click install
npx skills add https://github.com/BoraPerusic/agents --skill postgres-best-practices-boraperusic
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: postgres-best-practices
Source: https://github.com/BoraPerusic/agents/tree/main/skills/to%20try/antigravity-bundle-data-analytics/skills/postgres-best-practices
Command: npx skills add https://github.com/BoraPerusic/agents --skill postgres-best-practices-boraperusic

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Postgres performance optimization guidance for developers using Supabase. It consolidates rules across indexing, partitioning, RLS, and server configurations to improve query performance and scalability.

Core Features & Use Cases

  • Comprehensive best-practice rules for Postgres performance, including Query Performance, Connection Management, Security & RLS, Schema Design, Concurrency, Data Access, Monitoring, and Advanced Features.
  • Real-world examples illustrating incorrect vs correct patterns, with concrete SQL snippets and recommended configurations to accelerate Postgres workloads in Supabase projects.
  • Use cases include optimizing queries, designing efficient schemas, configuring connection pools, and implementing robust RLS for multi-tenant data.

Quick Start

Audit your database against a compiled set of Postgres optimization rules and apply the recommended changes.

Frequently Asked Questions about postgres-best-practices

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

FAQPage Schema
How do I optimize Postgres query performance in Supabase?

To optimize Postgres query performance, you can apply concrete SQL patterns for indexing and query structuring. This provides specific rules to accelerate workloads by auditing your database against recommended configurations and schema designs.

What's the best way to design a Postgres schema for multi-tenant data access?

Designing a Postgres schema for multi-tenant data requires robust Row Level Security (RLS) and efficient data access patterns. It offers best-practice rules to implement secure RLS and structure schemas for scalable multi-tenant deployments.

How do I configure connection pooling for serverless Postgres environments?

Configuring connection pooling for serverless Postgres involves applying specific connection management rules. It provides recommended configurations to manage connections efficiently across production, staging, and serverless environments.

When should I use table partitioning in Postgres?

Table partitioning in Postgres is used to improve query performance and scalability for large datasets. It includes partitioning within comprehensive optimization rules, offering concrete SQL patterns to determine correct schema designs.

Can I use these Postgres optimization rules for production and staging environments?

Yes, these Postgres optimization rules apply across production, staging, and serverless environments. It categorizes rules for connection management, monitoring, and concurrency to guide automated optimization in any deployment stage.

Why is my Supabase Postgres query slow and how do I fix it?

Slow Supabase Postgres queries often stem from missing indexes or inefficient schema designs. It helps identify incorrect patterns and apply correct SQL snippets, indexing strategies, and monitoring rules to resolve performance bottlenecks.