supabase-performance

Optimize Supabase PostgreSQL queries with indexing, pagination, and selective columns.

Updated Aug 29, 2023
One-click install
npx skills add https://github.com/SaschaLeh/dotfiles --skill supabase-performance
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: supabase-performance
Source: https://github.com/SaschaLeh/dotfiles/tree/main/dot_claude/skills/supabase-performance
Command: npx skills add https://github.com/SaschaLeh/dotfiles --skill supabase-performance

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Optimizes Supabase PostgreSQL query performance by teaching actionable strategies to reduce latency and resource usage, including indexing, selective columns, pagination, caching, and connection management in real-time apps.

Core Features & Use Cases

  • Indexing strategies: design indexes to support common filters and sorts.
  • Pagination patterns: switch from offset to cursor-based pagination.
  • Selective columns: load only needed fields to reduce I/O.
  • Realtime optimization: filter subscriptions to reduce data transfer.
  • Batch operations: apply bulk inserts/updates to minimize round-trips.
  • Diagnostics & tuning: interpret query plans and adjust configurations.

Quick Start

Review your Supabase queries and implement performance improvements using indexing, selective columns, and pagination.

Frequently Asked Questions about supabase-performance

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

FAQPage Schema
How do I improve Supabase PostgreSQL query performance?

Improve Supabase PostgreSQL query performance by designing targeted indexes, selecting only necessary columns, and switching to cursor-based pagination to reduce latency and resource usage.

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

Supabase pagination is slow when using offset limits. Fix pagination latency by switching to cursor-based patterns, which drastically reduce I/O overhead on large datasets.

How do I optimize Supabase realtime subscriptions to reduce data transfer?

Optimize Supabase realtime subscriptions by applying granular filters to subscriptions, ensuring clients only receive necessary data updates and minimizing network transfer.

What is the best way to interpret PostgreSQL query plans in Supabase?

Interpret PostgreSQL query plans in Supabase by analyzing execution paths to identify bottlenecks, then adjusting configurations and designing indexes to support common filters and sorts.

Can I use connection pooling and caching patterns for Supabase web apps?

Yes, you can use connection pooling and caching patterns in Supabase web apps to establish safe, batched data access and minimize database round-trips for bulk operations.

When should I apply bulk operations instead of single inserts in Supabase?

Apply bulk inserts and updates in Supabase when processing large datasets, as batch operations minimize database round-trips and significantly reduce overall query latency.