Use SQL (PostgreSQL) when:
Production-ready skill for mastering database optimization across PostgreSQL, MongoDB, and Redis.
This skill provides comprehensive guidance on database performance optimization, covering:
skills/database/advanced-optimization/
├── SKILL.md # Main skill document (1,406 lines)
├── templates/
│ ├── postgres-optimization.sql # PostgreSQL optimization queries
│ ├── mongodb-sharding.yaml # MongoDB sharding configuration
│ ├── redis-caching.py # Redis caching pattern implementations
│ └── monitoring-dashboard.json # Grafana monitoring dashboard
├── scripts/
│ └── query-profiling.sh # Automated database profiling
├── config/
│ └── pgbouncer.ini # PgBouncer connection pooling config
└── README.md # This file
Start with the SKILL.md file:
All templates are production-ready and can be adapted to your environment:
# PostgreSQL optimization
psql -U postgres -d myapp -f templates/postgres-optimization.sql
# MongoDB sharding setup
# Review and adapt mongodb-sharding.yaml to your cluster
# Redis caching
python3 templates/redis-caching.py
# Database profiling
./scripts/query-profiling.sh postgresql localhost 5432 postgres myapp
./scripts/query-profiling.sh mongodb localhost 27017 myapp
# PgBouncer setup
cp config/pgbouncer.ini /etc/pgbouncer/
systemctl restart pgbouncer
Import the Grafana dashboard:
# Import to Grafana
curl -X POST http://localhost:3000/api/dashboards/db \
-H "Content-Type: application/json" \
-d @templates/monitoring-dashboard.json
Part of the Standards Repository - See repository license for details.
npx skills add williamzujkowski/database-advanced-optimization下载完整 Skill 目录,包含 SKILL.md 及所有相关文件
Category:other
Tags:postgresql, mongodb, redis, performance, optimization, scaling, caching, sharding