安装方式
命令行安装
在项目根目录执行以下命令,完成 Skill 安装。
npx bzskills add supabase/agent-skills --skill supabase-postgres-best-practices 来自Supabase的Postgres性能优化和最佳实践。在编写、审查或优化Postgres查询、模式设计或数据库配置时使用此技能。
151.8k
下载量
命令行安装
在项目根目录执行以下命令,完成 Skill 安装。
npx bzskills add supabase/agent-skills --skill supabase-postgres-best-practices name: supabase-postgres-best-practices
description: 来自Supabase的Postgres性能优化和最佳实践。在编写、审查或优化Postgres查询、模式设计或数据库配置时使用此技能。
license: MIT
metadata:
author: supabase
version: "1.1.1"
organization: Supabase
date: January 2026
abstract: Comprehensive Postgres performance optimization guide for developers using Supabase and Postgres. Contains performance rules across 8 categories, prioritized by impact from critical (query performance, connection management) to incremental (advanced features). Each rule includes detailed explanations, incorrect vs. correct SQL examples, query plan analysis, and specific performance metrics to guide automated optimization and code generation.由 Supabase 维护的 Postgres 综合性能优化指南。包含按影响优先级排列的 8 个类别规则,用于指导自动化查询优化与 schema 设计。
在以下场景中请参考本指南:
| 优先级 | 类别 | 影响 | 前缀 |
|---|---|---|---|
| 1 | 查询性能 | 关键 | query- |
| 2 | 连接管理 | 关键 | conn- |
| 3 | 安全与 RLS | 关键 | security- |
| 4 | Schema 设计 | 高 | schema- |
| 5 | 并发与锁定 | 中-高 | lock- |
| 6 | 数据访问模式 | 中 | data- |
| 7 | 监控与诊断 | 低-中 | monitor- |
| 8 | 高级功能 | 低 | advanced- |
阅读各规则文件以获取详细解释和 SQL 示例:
references/query-missing-indexes.md
references/query-partial-indexes.md
references/_sections.md
每个规则文件包含: