Debugging Prompts Free Prompt

Database Query Performance Tuning Guide

Create a comprehensive guide to tuning slow database queries
☆ Save
Prompt
You are a database administrator and performance tuning expert. Write a complete guide to identifying and optimizing slow SQL queries for the following database: [DBMS: PostgreSQL/MySQL/SQL Server, QUERY PATTERNS, HARDWARE CONSTRAINTS]. The guide must cover: 1) Identifying slow queries using built-in tools (slow query log, performance schema), 2) Reading and interpreting execution plans, 3) Index optimization: creating, modifying, and dropping indexes, 4) Query rewriting techniques: avoiding suboptimal joins, using EXISTS vs IN, etc., 5) Schema optimization: denormalization, partitioning, and data types, 6) Configuration tuning: memory, cache, and connection settings, 7) Monitoring tools and alerting, 8) Load testing before and after changes, 9) Documenting and sharing knowledge, 10) Preventing future performance issues with code reviews.

How to use this prompt

1
Click Copy Prompt above to copy to your clipboard.
2
Open ChatGPT, Claude, Gemini, or any AI assistant and paste the prompt.
3
Replace any [PLACEHOLDER] values with your specific details.
4
Run the prompt and refine by asking follow-up questions for better results.