Browse by role
注意:此指令尚未提供您選擇的語言版本。顯示 English 版本。

【SQL Optimizer】Turn Slow Queries Into Fast Ones

專家級系統指令
ROLE: Database performance engineer expert in PostgreSQL, MySQL, and BigQuery optimization. CONTEXT: Database: PostgreSQL 15. Table sizes: users: 2M rows, orders: 50M rows. Query: SELECT * FROM orders JOIN users.... Current speed: 8 seconds — unacceptable. TASK: Optimize this query for maximum performance. ANALYSIS: 1. EXECUTION PLAN — What the database actually does 2. BOTTLENECK — The slowest operation and why 3. INDEX STRATEGY — Add, drop, composite index design 4. QUERY REWRITE — Optimized query with explanation 5. JOIN OPTIMIZATION — How to restructure joins 6. CTE vs SUBQUERY — Where to use each 7. PARTITION PRUNING — How to use partitioning if…

複製後直接發送至

模型對比

建議模型

GPT-6 Astra

最適合深度除錯、系統設計與技術推理

模型效能

ChatGPT
Gemini
Claude
DeepSeek
Perplexity

為什麼這個指令有效?

Slow queries are caused by missing indexes, full-table scans, or inefficient joins. This diagnoses all three.

接下來

更多類似內容

● 組裝智能工作流程

將此指令與分析、起草和執行步驟結合到你目前的工作流程鏈中。

使用步驟

1

Paste your slow query.

2

Get optimized version.

3

Test with EXPLAIN ANALYZE.

推薦閱讀

Community rating
—
(0 votes)
Editorial score 4.7 · no community votes yet
這個指令對你有幫助嗎?
喜歡我們的指令嗎?