Back to All Tags
Tag • 4 Prompts

#Query Optimization

Explore all AI prompts tagged with #Query Optimization.

Prompts tagged with #Query Optimization

Claude

Here is a slow PostgreSQL query and its EXPLAIN ANALYZE output. Walk the plan node by node, identify the dominant cost, and propose fixes in order of least invasive: query rewrite, then index, then schema change. Estimate the impact of each. Never suggest an index without naming its write cost. [QUERY + PLAN]

▸ ready to run
Claude

Here is a slow PostgreSQL query and its EXPLAIN ANALYZE output. Walk the plan node by node, identify the dominant cost, and propose fixes in order of least invasive: query rewrite, then index, then schema change. Estimate the impact of each. Never suggest an index without naming its write cost. [QUERY + PLAN]

Slow Query Explainer and Fixer

A query-tuning prompt ordered by invasiveness so you try rewrites before adding indexes. Requiring the write-cost caveat on every index suggestion filters out advice that would just move the pain to inserts.

1.2K190
Claude

Review this schema migration for a production Postgres database under load. Check: lock levels per statement, table rewrite triggers, index build strategy, and rollback path. Output a go/no-go verdict with the exact statement that carries the most risk and a safer sequencing if one exists. [PASTE MIGRATION]

▸ ready to run
Claude

Review this schema migration for a production Postgres database under load. Check: lock levels per statement, table rewrite triggers, index build strategy, and rollback path. Output a go/no-go verdict with the exact statement that carries the most risk and a safer sequencing if one exists. [PASTE MIGRATION]

Migration Plan Reviewer

A pre-deploy gate for schema changes: every statement gets a lock-level check and the riskiest one is named explicitly. The safer-sequencing requirement regularly converts a table-locking migration into a zero-downtime one.

53392
Claude

I want you to act as a SQL terminal in front of an example database. The database contains tables named "Products", "Users", "Orders" and "Suppliers". I will type queries and you will reply with what the terminal would show. I want you to reply with a table of query results in a single code block, and nothing else. Do not write explanations. Do not type commands unless I instruct you to do so. When I need to tell you something in English I will do so in curly braces {like this). My first command is 'SELECT TOP 10 * FROM Products ORDER BY Id DESC'

▸ ready to run
Claude

I want you to act as a SQL terminal in front of an example database. The database contains tables named "Products", "Users", "Orders" and "Suppliers". I will type queries and you will reply with what the terminal would show. I want you to reply with a table of query results in a single code block, and nothing else. Do not write explanations. Do not type commands unless I instruct you to do so. When I need to tell you something in English I will do so in curly braces {like this). My first command is 'SELECT TOP 10 * FROM Products ORDER BY Id DESC'

SQL Terminal for Query Result Rehearsal

Simulates a database terminal that answers with result tables only. Good for sanity-checking join logic, grouping, and window functions against a sample schema before you run anything against real data. Explanations stay suppressed unless you explicitly request them.

33.9K
Claude

Act as a Code Optimization Expert specialized in C#. You are an experienced software engineer focused on enhancing performance when dealing with large-scale data processing. Your task is to provide professional techniques and methods for efficiently reading large amounts of data from a SOAP API response in C#. You will: - Analyze current data reading methods and identify bottlenecks - Suggest alternative approaches to read data in bulk, reducing memory usage and improving speed - Recommend best practices for handling large data sets in C#, such as using streaming techniques or parallel processing Rules: - Ensure solutions are adaptable to various SOAP APIs - Maintain data integrity and accuracy throughout the process - Consider network and memory constraints when providing solutions

▸ ready to run
Claude

Act as a Code Optimization Expert specialized in C#. You are an experienced software engineer focused on enhancing performance when dealing with large-scale data processing. Your task is to provide professional techniques and methods for efficiently reading large amounts of data from a SOAP API response in C#. You will: - Analyze current data reading methods and identify bottlenecks - Suggest alternative approaches to read data in bulk, reducing memory usage and improving speed - Recommend best practices for handling large data sets in C#, such as using streaming techniques or parallel processing Rules: - Ensure solutions are adaptable to various SOAP APIs - Maintain data integrity and accuracy throughout the process - Consider network and memory constraints when providing solutions

Large Data Read Optimiser for Memory-Bound Code

Analyses code that ingests large files or result sets and proposes streaming, chunking, or indexing improvements. Useful when a job works on sample data then dies in production, which is almost always a memory or I/O pattern problem rather than raw speed.

38.4K