postgresql-optimization
Skill này làm gì
Công cụ này giúp cải thiện tốc độ và hiệu suất cơ sở dữ liệu PostgreSQL. Nó phân tích các truy vấn chậm, gợi ý chỉ mục và điều chỉnh cài đặt để mọi thứ chạy nhanh hơn.
Khi nào nên dùng
- ✓Khi các truy vấn cơ sở dữ liệu của bạn chạy chậm.
- ✓Khi thiết kế hoặc điều chỉnh bảng và chỉ mục.
- ✓Khi kiểm tra xem cài đặt cơ sở dữ liệu đã tối ưu chưa.
Liên kết skill
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/postgresql-optimization/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Làm thế nào để tối ưu các truy vấn chậm trong cơ sở dữ liệu PostgreSQL của tôi?”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Công cụ phân tích cách cơ sở dữ liệu đang hoạt động, xác định điểm nghẽn và đề xuất thay đổi. Nó có thể khuyến nghị tạo chỉ mục hoặc điều chỉnh cấu hình để tăng tốc truy cập dữ liệu.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
PostgreSQL Optimization Workflow
Overview
Specialized workflow for PostgreSQL database optimization including query tuning, indexing strategies, performance analysis, vacuum management, and production database administration.
When to Use This Workflow
Use this workflow when:
- Optimizing slow PostgreSQL queries
- Designing indexing strategies
- Analyzing database performance
- Tuning PostgreSQL configuration
- Managing production databases
Workflow Phases
Phase 1: Performance Assessment
Skills to Invoke
database-optimizer- Database optimizationpostgres-best-practices- PostgreSQL best practices
Actions
- Check database version
- Review configuration
- Analyze slow queries
- Check resource usage
- Identify bottlenecks
Copy-Paste Prompts
Use @database-optimizer to assess PostgreSQL performance
Phase 2: Query Analysis
Skills to Invoke
sql-optimization-patterns- SQL optimizationpostgres-best-practices- PostgreSQL patterns
Actions
- Run EXPLAIN ANALYZE
- Identify scan types
- Check join strategies
- Analyze execution time
- Find optimization opportunities
Copy-Paste Prompts
Use @sql-optimization-patterns to analyze and optimize queries
Phase 3: Indexing Strategy
Skills to Invoke
database-design- Index designpostgresql- PostgreSQL indexing
Actions
- Identify missing indexes
- Create B-tree indexes
- Add composite indexes
- Consider partial indexes
- Review index usage
Copy-Paste Prompts
Use @database-design to design PostgreSQL indexing strategy
Phase 4: Query Optimization
Skills to Invoke
sql-optimization-patterns- Query tuningsql-pro- SQL expertise
Actions
- Rewrite inefficient queries
- Optimize joins
- Add CTEs where helpful
- Implement pagination
- Test improvements
Copy-Paste Prompts
Use @sql-optimization-patterns to optimize SQL queries
Phase 5: Configuration Tuning
Skills to Invoke
postgres-best-practices- Configurationdatabase-admin- Database administration
Actions
- Tune shared_buffers
- Configure work_mem
- Set effective_cache_size
- Adjust checkpoint settings
- Configure autovacuum
Copy-Paste Prompts
Use @postgres-best-practices to tune PostgreSQL configuration
Phase 6: Maintenance
Skills to Invoke
database-admin- Database maintenancepostgresql- PostgreSQL maintenance
Actions
- Schedule VACUUM
- Run ANALYZE
- Check table bloat
- Monitor autovacuum
- Review statistics
Copy-Paste Prompts
Use @database-admin to schedule PostgreSQL maintenance
Phase 7: Monitoring
Skills to Invoke
grafana-dashboards- Monitoring dashboardsprometheus-configuration- Metrics collection
Actions
- Set up monitoring
- Create dashboards
- Configure alerts
- Track key metrics
- Review trends
Copy-Paste Prompts
Use @grafana-dashboards to create PostgreSQL monitoring
Optimization Checklist
- Slow queries identified
- Indexes optimized
- Configuration tuned
- Maintenance scheduled
- Monitoring active
- Performance improved
Quality Gates
- Query performance improved
- Indexes effective
- Configuration optimized
- Maintenance automated
- Monitoring in place
Related Workflow Bundles
database- Database operationscloud-devops- Infrastructureperformance-optimization- Performance
Limitations
- Use this skill only when the task clearly matches the scope described above.
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
Câu hỏi thường gặp
Chỉ mục là gì?
Chỉ mục giống như mục lục ở cuối sách. Chúng giúp cơ sở dữ liệu tìm thông tin nhanh hơn mà không phải đọc hết mọi thứ.
Truy vấn chậm là gì?
Đây là các lệnh gửi đến cơ sở dữ liệu mất nhiều thời gian để phản hồi, làm ảnh hưởng đến tốc độ ứng dụng.
Tôi có cần là chuyên gia PostgreSQL để dùng công cụ này không?
Không, công cụ được thiết kế để hướng dẫn bạn ngay cả khi không có kiến thức sâu, giải thích các bước và đề xuất.
Chi tiết
Mô tả gốc của tác giả
PostgreSQL database optimization workflow for query tuning, indexing strategies, performance analysis, and production database management.
Độ phổ biến
- Sao GitHub
- 48k
- Vị trí xếp hạng
- #5473
- Giấy phép
- MIT
- Cập nhật
- 15/10/2026
Bình luận
- …
Thêm skill từ kho mã này
00-andruia-consultant
48kGiúp agent của bạn bắt đầu hoặc cải thiện các dự án AI. Phân tích mã, gợi ý công cụ và lập kế hoạch hành động bằng tiếng Tây Ban Nha.
007
48kCho phép agent của bạn thực hiện kiểm toán bảo mật và mô hình hóa mối đe dọa. Hữu ích để bảo vệ dự án khỏi các cuộc tấn công và lỗ hổng.
10-andruia-skill-smith
48kGiúp agent của bạn tạo hoặc cải thiện các công cụ AI. Xác định cách công cụ hoạt động, viết tài liệu và kiểm tra cấu trúc.
20-andruia-niche-intelligence
48kGiúp agent của bạn tạo bản tóm tắt về một ngành cụ thể. Hữu ích để hiểu bối cảnh, quy tắc, cách người dùng tương tác và rủi ro của dự án.
Skill tương tự
discrawl
394kCho phép agent của bạn tìm kiếm và tóm tắt kho lưu trữ tin nhắn Discord trên máy, kiểm tra độ mới của dữ liệu và đọc tin nhắn trực tiếp.
clickhouse-io
280kGiúp agent của bạn tối ưu truy vấn và schema trong ClickHouse theo thực hành tốt nhất cho phân tích dữ liệu hiệu năng cao khi truy vấn chậm.
scientific-db-pubmed-database
280kGiúp agent của bạn tìm bài báo khoa học trong lĩnh vực y sinh. Hữu ích cho nghiên cứu cần thông tin y khoa cụ thể.