Advisor analyses your SQL against 53 enterprise T-SQL rules, ranks issues by severity, and provides ready-to-run fixes — index recommendations included.
Input: an N+1 query pattern. Output: severity-ranked findings with Rule IDs, before/after code, and index recommendations.
## Performance Assessment: 4/10 ## Issues Found ### 🔴 Critical — SUBQUERY_WHERE (Severity 5) **Finding:** Correlated subqueries in SELECT clause execute once per row. **Impact:** With 50,000 users, this runs 100,000 subqueries instead of 2 JOINs. **Fix:** ```sql -- Before (N+1 pattern) SELECT u.id, u.email, (SELECT COUNT(*) FROM orders o WHERE o.user_id = u.id) AS order_count, (SELECT MAX(created_at) FROM orders o WHERE o.user_id = u.id) AS last_order FROM users u -- After (single JOIN) SELECT u.id, u.email, COUNT(o.id) AS order_count, MAX(o.created_at) AS last_order FROM users u LEFT JOIN orders o ON o.user_id = u.id GROUP BY u.id, u.email ``` **Estimated gain:** 95–99% reduction in logical reads. ### 🟠 High — ORDER_BY_NO_TOP (Severity 1) **Finding:** ORDER BY without TOP/OFFSET forces a full sort of the result set. **Recommendation:** Add TOP N or OFFSET/FETCH if only a subset is needed. ## Index Recommendations ```sql CREATE INDEX IX_orders_user_id_created ON orders (user_id) INCLUDE (created_at, id); ``` ## Validation Checklist - [x] Logical reads reduced? - [x] Functional equivalence confirmed? - [ ] Test with production data volume
Not just "add an index" — Advisor understands query patterns, cardinality, and SQL Server internals.
Checks every query against 53 enterprise T-SQL rules across performance, security, best practices, and maintainability categories.
Issues are ranked from Severity 1 (low) to Severity 5 (critical). Focus on what matters most — not a wall of equal-weight warnings.
Generates ready-to-run CREATE INDEX statements with INCLUDE columns based on your specific query's access patterns.
Every finding includes a concrete code fix — not just a description of the problem. Copy the rewritten query and test it immediately.
Advisor estimates the impact of each fix — from 'minor improvement' to '99% reduction in logical reads' — so you prioritise correctly.
Catches N+1 patterns, correlated subqueries, SELECT INTO #temp, cursors, implicit type conversions, and 40+ other common SQL anti-patterns.
Run Advisor on every new query before it hits production. Catch performance issues when they're cheap to fix, not after they cause incidents.
Paste the slow query into Advisor. Get a ranked list of issues with specific fixes — no need to read execution plans manually.
Use Advisor output as the basis for SQL code reviews. Every finding has a Rule ID, severity, and fix — structured feedback in seconds.
Run Advisor on stored procedures written 5+ years ago. Identify which ones have critical performance issues worth refactoring.
Execution plan analysis (QueryPlan rules) is on the roadmap. Currently Advisor analyses the query text directly against 53 T-SQL rules.
Estimates are indicative, not exact. They're based on known patterns (e.g., correlated subqueries always cause N+1 reads). Always validate fixes in a test environment with representative data.
Index recommendations are generated when Advisor detects missing index opportunities based on the query's filter and join columns. Not every query needs a new index.
Sign in to run Advisor on your own SQL queries. 3 free uses — no credit card required.
Start free3 free uses after registration. No credit card required.
Start free