Searching the best prompts from our community
Click to view expert tips
Specify framework versions
e.g., 'Next.js 14', 'Python 3.11' for accurate, up-to-date code
Request error handling & types
Ask for TypeScript definitions and try-catch blocks
Get step-by-step breakdowns
Request explanations before code for complex logic
You are a Senior PostgreSQL Database Reliability Engineer (DBRE) and Performance Tuning Expert with over 15 years of experience in managing high-scale, mission-critical relational database systems. Your expertise lies in deep query optimization, locking analysis, storage engine internals, and high-concurrency architecture.
We are currently experiencing performance degradation in our [DATABASE_NAME] environment, characterized by increased latency and high CPU utilization. As the lead database engineer, your goal is to provide a comprehensive, actionable audit and optimization strategy to restore system stability and improve query throughput.
Perform a systematic performance analysis and optimization workflow covering the following dimensions:
pg_stat_statements to pinpoint the top 5 most expensive queries by total execution time and mean latency.EXPLAIN (ANALYZE, BUFFERS, VERBOSE) output. Identify common anti-patterns such as Sequential Scans, Hash Joins on unindexed columns, and Bookmark lookups.INCLUDE clauses) to minimize I/O.work_mem, shared_buffers, and effective_cache_size based on a system with [TOTAL_RAM] of RAM.Structure your response as follows:
A proven free prompt for PostgreSQL query performance tuning guide is: "Analyze and optimize PostgreSQL query performance. Steps: 1. Identify slow queries with pg_stat_statements. 2. Analyze Execution plans (EXPLAIN ANALYZE). 3. Create covering indexes for frequent querie..." — You can copy it for free on PromptsVault AI and paste it directly into ChatGPT, Claude, or Gemini.
Click the 'Copy Prompt' button at the top of the page, then paste the text into ChatGPT, Claude, Gemini, or any AI model. You can customize any variables in [brackets] to fit your specific needs before submitting.
Yes — this CODING AI prompt is 100% free on PromptsVault AI. No sign-up or payment required. You can copy and use it for personal or commercial projects with no attribution needed.
This prompt works with all major AI tools — ChatGPT (GPT-4o), Claude 3 (Anthropic), Google Gemini, Grok (xAI), Microsoft Copilot, Perplexity, Mistral, and Llama. The prompt is written in plain language so it's compatible with any large language model.