SOQL Optimizer Inspector is a powerful Visual Studio Code extension designed for Salesforce developers and architects. It automates performance analysis, detects query inefficiencies, checks filter compliance, and monitors Salesforce governor limits directly from your debug logs.
⚡ Key Advantages
Prevent Governor Limit Violations: Automatically alerts you when transaction query counts exceed 90+, helping you catch System.LimitException: Too many SOQL queries: 101 errors before code reaches production.
Identify Performance Bottlenecks: Detects redundant, duplicate queries—even when runtime bind variables or dynamic Record IDs change between executions.
Filter Compliance Auditing: Highlights unfiltered queries (missing WHERE clauses) that can cause slow table scans and high heap usage.
Human-Readable Query Intent: Automatically translates complex SOQL statements and parent-child subqueries into simple, plain-English intent summaries.
Seamless Salesforce CLI Integration: Pulls and inspects debug logs directly from your connected orgs without leaving VS Code.
🚀 Features
📊 Unified Dashboard: Clean Webview interface presenting all query insights in an easy-to-read layout.
📋 Object Compliance Table: Consolidated summary showing total query count per object and filter compliance status.
🔄 Smart Duplicate Query Detection: Uses signature normalization to catch loop-driven queries across transactions.
⚠️ Real-Time Warning Banners: High-visibility alerts for query limit thresholds and repeated queries.
📥 Installation
From VS Code Marketplace (Recommended)
Open VS Code.
Go to the Extensions view (Ctrl+Shift+X or Cmd+Shift+X).
Search for SOQL Optimizer Inspector.
Click Install.
🛠️ Prerequisites
Salesforce CLI (sf): Ensure the Salesforce CLI is installed and authenticated to your target org.
Salesforce Project Workspace: Open your Salesforce DX project folder in VS Code.
📖 How to Use
Open Command Palette: Press Ctrl+Shift+P (Windows/Linux) or Cmd+Shift+P (macOS).
Run Command: Type and select SOQL Optimizer: Inspect Latest Log.
Select Debug Log: Choose the debug log you wish to analyze from the interactive Quick Pick list.
View Insights: The SOQL Optimizer Dashboard will automatically open, presenting limit warnings, duplicate detection reports, object summary tables, and intent breakdowns.