SQLLens.AI Docs
Documentation

SQLLens.AI Product Docs

Everything you need to use SQLLens.AI inside VS Code or Cursor — from your first connection to deep performance tuning, AI-assisted SQL, and the cloud account.

Animated demo: SQLLens.AI in VS Code — connection tree, SQL editor, Query Results, and drag-and-drop Query Builder.
SQLLens.AI in VS Code — explorer, editor, Query Results, and drag-and-drop Query Builder.
Animated demo: AI SQL Copilot — prompt to production-ready SQL.
AI SQL Copilot — natural language to optimized SQL in the editor.

What SQLLens.AI is

SQLLens.AI is a database workspace that lives in your editor. It connects to MySQL and MariaDB servers, gives you a fast SQL editor with autocomplete and CodeLens, a drag‑and‑drop query builder, a schema designer, and a suite of performance tools — the Query Optimizer (QO), Slow Query Log Analyzer (QLA), Performance Monitor (PM) and Query Profiler. AI features can generate, fix and explain SQL using the provider of your choice.

Get started

Cloud & sqllens.ai account

Optional sign-in powers cloud-backed AI routing and (if enabled in your organization) usage metering. You can run SQL, connections, and local LLMs entirely without an account—see offline / local-only mode.

Query Optimizer — AI index advisory

The Query Optimizer workbench now includes Index Strategy Studio on the Analyze panel: rule-based Index Engine suggestions, one-click AI Advisor (Auto), and on MySQL/MariaDB 3 AI compare (LLMs) — run up to three models in parallel, rank by consensus, and create the winning index DDL.

Index Strategy Studio tabs: Index Engine, AI Advisor, and 3 AI compare with ranked index recommendation cards.
Index Strategy Studio inside Query Optimizer — internal algorithm plus optional AI advisory and multi-model consensus (MySQL/MariaDB).
3 AI compare panel with three model slots, Run consensus, status bar, and unanimous recommendation.
3 AI compare (LLMs) — parallel model runs, status bar, and agreement-ranked recommendations.

MCP & AI database access

Let Copilot Agent, Cursor, and chat query your saved SQLLens connections — schema discovery, read-only SELECT, optional writes, and @sql / @sqllens participants. No manual MCP config inside the editor.

Diagram: Agent or chat connects through SQLLens MCP to saved profiles and a database.
MCP and chat route through SQLLens to saved connection profiles — Active SQL tab by default, any profile when specified.

Explore the product

Roughly follow: workspace → query builder → schema & data tools → performance pillars (QO, QLA, PM, Profiler) → AI → settings & shortcuts → advanced diagnostics.

Next steps & links

New to SQLLens.AI? Go to Get started, then Connect a database. With a live connection, read SQL editor & workspace for day-to-day editing, run, and favorites.