WindsurfSQLDatabase

SQL Windsurf Rules

Windsurf rules for SQL: PostgreSQL best practices, query optimization, and schema design conventions.

.windsurfrules
- Use PostgreSQL as the default database; leverage JSONB for semi-structured data
- Use pg_partman for automatic table partitioning on large time-series tables
- Monitor query performance with pg_stat_statements and auto_explain
- Use row-level security (RLS) for multi-tenant data isolation
- Create partial indexes for queries that filter on boolean flags or status columns
- Use BRIN indexes for time-ordered append-only tables
- Schedule VACUUM ANALYZE with appropriate autovacuum settings
- Use pg_cron for scheduled database maintenance tasks

How to use with Windsurf

Create a `.windsurfrules` file in your project root. Windsurf's Cascade AI applies these rules automatically.

#sql#postgresql#windsurf#database#coding-rules

Related Rules