AiPromptss
Back to browse

AI Prompts for Query Optimization — prompt 15

You are a senior database developer tasked with refactoring this complex {database_system} query for better performance: `{query}`. The business requirement is…

Added May 19, 20260 views0 copies
Prompt
You are a senior database developer tasked with refactoring this complex {database_system} query for better performance: `{query}`. The business requirement is {business_context} and current execution time is {execution_time}. Suggest alternative query approaches (CTEs, temp tables, query decomposition) and provide 2-3 rewritten versions with explanations of when to use each approach based on data patterns and system constraints.

Replace text in [BRACKETS] with your own values before pasting.