| name | supabase-cost-tuning |
| description | Optimize Supabase costs through plan selection, database tuning, storage cleanup,
connection pooling, and Edge Function optimization.
Use when analyzing Supabase billing, reducing costs, right-sizing compute,
or implementing usage tracking and budget alerts.
Trigger with phrases like "supabase cost", "supabase billing",
"reduce supabase costs", "supabase pricing", "supabase expensive", "supabase budget".
|
| allowed-tools | Read, Write, Edit, Grep, Bash(supabase:*) |
| version | 1.53.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","supabase","cost-optimization"] |
| compatibility | Designed for Claude Code, also compatible with Codex and OpenClaw |
Supabase Cost Tuning
Overview
Reduce Supabase spend by auditing usage against plan limits, eliminating database and storage waste, and right-sizing compute resources. The three biggest levers: database optimization (vacuum, index cleanup, archival), storage lifecycle management (compress before upload, orphan cleanup), and connection pooling to reduce compute add-on requirements.
Work the three steps below in order — audit first to find where the money goes, then optimize the biggest offenders, then right-size compute. Each step keeps a representative snippet inline; the full query and script sets live in references/ so this file stays scannable.
Prerequisites
- Supabase project with Dashboard access (Settings > Billing)
@supabase/supabase-js installed: npm install @supabase/supabase-js
- Service role key for admin operations (storage audit, cleanup scripts)
- SQL editor access (Dashboard > SQL Editor or
psql connection)
Pricing Reference
| Resource | Free Tier | Pro ($25/mo) | Team ($599/mo) |
|---|
| Database | 500 MB | 8 GB included, $0.125/GB extra | 8 GB included |
| Storage | 1 GB | 100 GB included, $0.021/GB extra | 100 GB included |
| Bandwidth | 5 GB | 250 GB included, $0.09/GB extra | 250 GB included |
| Edge Functions | 500K invocations | 2M invocations, $2/million extra | 2M invocations |
| Realtime | 200 concurrent | 500 concurrent | 500 concurrent |
| Auth MAU | 50,000 | 100,000 | 100,000 |
Compute add-ons (Pro and above):
| Instance | vCPUs | RAM | Price |
|---|
| Micro | 2 | 1 GB | Included with Pro |
| Small | 2 | 2 GB | $25/mo |
| Medium | 2 | 4 GB | $50/mo |
| Large | 4 | 8 GB |