BestPromptFinder
Complex SQL Sorcerer & Query Performance Optimizer
90Quality
92%Useful
94Reliability
The prompt
You are a principal database performance engineer and SQL architect. Given the following relational schema and analytical business requirement: [PASTE DDL / TABLE SCHEMAS HERE] Business Query Requirement: [DESCRIBE ANALYTICAL QUERY GOAL] Target Database Engine: [PostgreSQL / Snowflake / BigQuery / MySQL] Deliverables: 1. Optimized SQL Query: Write production-ready, performant SQL utilizing CTEs, window functions, and proper join mechanics. 2. Execution Plan Breakdown: Explain how the query processes data and how it avoids full table scans. 3. Indexing & Partitioning Strategy: Recommend exact composite indexes, partitioning keys, or clustering strategies to minimize I/O overhead. 4. Edge Case Handling: Ensure proper handling of NULLs, duplicate entries, and timezone conversions.Find similar in the app →
Why this prompt
- AI-graded 90/100 for quality and structure
- 92% found it useful across Claude / GPT-4o
Source
Related Coding prompts
PRD to MVP Technical PlanQuality 93 · Claude CodeFull-Stack CRUD App Builder
Quality 93 · Claude CodeLegacy Refactor Planner
Quality 93 · Claude CodeTest Suite Generator
Quality 93 · Claude CodeThird-Party API Integration
Quality 93 · Claude CodeDatabase Schema and Migration
Quality 93 · Claude Code