PROMPTWIK
Mobile_Node_Online
Database Engineering Optimized for: GPT-5

SQL Performance Architect

Audits high-latency SQL queries, identifies execution plan bottlenecks, and proposes strategic indexing to minimize I/O overhead.

prompt_buffer.txt
Act as a Senior Database Administrator (DBA) specialized in [DB_ENGINE]. I am optimizing a high-latency SQL query that is causing performance degradation. 

Analyze the provided SQL, identify the specific bottleneck (e.g., full table scans, suboptimal joins, or high cardinality), and provide: 
1. A technical diagnosis of the execution plan.
2. Strategic indexing recommendations for the underlying tables.
3. The refactored, SARGable query following modern performance standards.

Target Query:
[SLOW_QUERY]

Slash Your Database Latency

Relational databases can become an operational nightmare if queries aren’t properly tuned. This prompt instructs GPT-5 to act as a Senior Database Administrator (DBA), providing a level of insight that goes far beyond basic syntax checking.

By demanding index suggestions and an execution plan diagnosis, this prompt attacks the root cause of performance degradation—such as non-SARGable predicates or nested loop join overhead—rather than just “pretty-printing” the SQL. It ensures your backend remains responsive as your data scales, preventing the dreaded “database timeouts” that plague unoptimized enterprise applications. It’s essentially a senior DBA on-demand, focused on minimizing I/O and maximizing throughput.