VIP 👤
🏠 Trang chủ
Benchmark
📊 Tất cả benchmark 🦖 Khủng long v1 🦖 Khủng long v2 ✅ Ứng dụng To-Do List 🎨 Trang tự do sáng tạo 🎯 FSACB - Trình diễn cuối cùng 🌍 Benchmark dịch thuật
Mô hình
🏆 Top 10 mô hình 🆓 Mô hình miễn phí 📋 Tất cả mô hình ⚙️ Kilo Code
Tài nguyên
💬 Thư viện prompt 📖 Thuật ngữ AI 🔗 Liên kết hữu ích 🔌 API và bộ định tuyến AI
advanced

Enterprise SQL Query Performance Tuner

#sql #database #optimization #performance

Advanced prompt for analyzing and optimizing complex SQL queries for execution plans and index efficiency.

Assume the role of a Database Performance Tuning Expert. Analyze the following complex SQL query designed for a PostgreSQL database. Critique the query for potential full table scans, inefficient joins, subquery execution orders, and N+1 problems. Suggest specific indexing strategies to support the query. Rewrite the query to optimize for read performance, assuming a dataset of 100 million rows, and explain the execution plan changes your rewrite would induce.