Database Performance AnalyzerFind expensive database work without leaving VS Code. VS Code 1.71.2 is supported for PostgreSQL, MySQL/MariaDB, SQLite and demo. Use VS Code 1.101+ for all six engines. A guided connection flow leads to a dashboard of query costs, sessions, storage, indexes and actionable performance observations. All six engines require VS Code 1.101 or later (Node 22 extension host). Supported: PostgreSQL 13+, MySQL 8+ / MariaDB with compatible Performance Schema, SQL Server 2019+, SQLite 3 files, MongoDB 6+, Redis 6+. Database distributions and services may expose fewer diagnostics. This is not universal support for every database product. Start in a minute
Use a dedicated account with only the required read and monitoring privileges. Passwords and complete URLs are saved in VS Code's encrypted SecretStorage. Non-secret connection names and target labels are stored in extension global state. Under Remote SSH or containers, database access runs on the workspace host; Connection URLs
Automatic security uses verified TLS for remote hosts and plaintext for loopback hosts. Connection URLs requesting encryption also use verified TLS. You can override the choice in Connection security for local development or a trusted tunnel. Self-signed certificates must be trusted by the Node/OS trust configuration; certificate verification cannot be disabled in the extension. For Redis, the URL scheme is normalized to match the TLS choice. MySQL and SQL Server use the host, port, user, password and database fields; MySQL URL query parameters are not applied. SQL Server supports SQL authentication; integrated authentication and named instances are not included. MongoDB SRV and Redis What you can inspect
Missing permissions or disabled features produce collection notices. The extension does not install extensions, enable profiling, reset statistics, create indexes, vacuum, terminate sessions or change server configuration. Object inventories are capped at 100 objects per collector; queries and slow-log samples at 50. MongoDB lists at most 100 collections for index inspection. Dashboard
Query analysisSelect a SELECT in a SQL editor and run Database Performance: Explain Selected SQL, or use the dashboard's plan editor. Supply representative literal values in place of application parameters or normalized digest placeholders. Only a single parsable SELECT is accepted. Write statements, write CTEs, SELECT INTO, locking reads and known unsafe functions are rejected. This is a conservative SQL parser, not a complete security sandbox: use trusted SQL and a least-privilege account. Estimated EXPLAIN does not normally execute a query, but optimizers can evaluate functions. PostgreSQL runs plans inside a read-only transaction with timeouts and rollback. EXPLAIN ANALYZE explicitly executes the SELECT after a modal confirmation; functions may have external effects even in a read-only transaction. SQL Server's SHOWPLAN connection is isolated to a single-connection pool and closed afterward. SQLite inspection uses a read-only in-memory copy, supports files up to 256 MB and refuses non-empty WAL or rollback-journal files. Use SQLite's backup facility to make a consistent copy of an active database. SQLite inspection runs in a separate worker, with deadline enforcement and termination on cancellation. File size, format, journal sidecars and file metadata are checked before accepting a copy. This reduces inconsistency risk but is not a database-level snapshot guarantee; use a consistent backup. Automatic project discoveryDetection reads up to 100 matching configuration/model files, each at most 1 MB, excluding common dependency/build directories. It recognizes literal URLs in Discovery inspects text without executing project code or evaluating environment substitutions. When invoked through connection setup, a single detected candidate is checked and saved; multiple candidates let you choose. Dynamic configuration, unsupported separate-field conventions, unusual file naming, JDBC URLs, embedded code and unsupported engines need manual setup. Detection may identify a dependency even when that framework is not actively used. Database permissions and setup
Settings
Develop and verify
Press F5 to open an Extension Development Host. Host tests require a graphical session; use Drivers and their license notices are bundled into the VSIX. No database credentials, PublishingThe configured publisher ID is Easier dashboard controls in 1.2
Dynamic controls in 1.3Click a finding summary to view that severity. Diagnostic tabs show available record counts. Slow only filters query patterns using History charts show minimum, maximum and latest values. Hover over a point for its capture time and value. History is local and lost on reload; it represents collected samples rather than continuous server measurements. Source and issue reports: GitHub repository. Compatibility and connection guidance in 1.4
The extension now compiles against the VS Code 1.71 API and builds for Node 16.14. Modern drivers are loaded only when used and checked against their runtime requirements. It does not downgrade database drivers to obsolete versions. Local database defaults skips host and port entry. Guided setup has Back buttons, individual validation and field explanations. Manage connection → Edit connection fields lets you change host, port, database and username; leaving the password blank keeps the stored password. Connection URL options are preserved. Use Update connection URL for MongoDB SRV/cluster URLs or to remove an existing password. Changes save securely and refresh the selected connection automatically. Hover over dashboard controls for tooltips, or expand Connection guide & troubleshooting for examples and advice. Open without the Command PaletteAfter first installation, a welcome notification offers Open Dashboard or Try Demo. The database icon in the left activity bar opens Dashboard & connections, which always has dashboard, add, detect and demo shortcuts, even before any connection is saved. There is also a dashboard button in the sidebar title and a DB Performance shortcut in the bottom status bar. Enable Database Performance › Open Dashboard On Startup in Settings to show the dashboard home screen on every launch. This is optional and does not open a database connection or start monitoring. Simple experience in 1.8Simple view is the default. Try sample data without a database, connect using a link or login details, or copy a request for your administrator. Opening a project folder is optional. The glossary explains database terms. The first result distinguishes limited monitoring access, insufficient activity, and findings requiring attention. Diagnostic readiness shows available checks, missing access, configuration problems and unsupported features. Advanced view exposes all metrics, inventory tabs and SQL tools; the preference is remembered. Failed connections retain form entries in the current webview for retry. Credentials clear on success or closing setup, and are never persisted in webview state. Connection passwords are saved only in SecretStorage after a successful check. Findings include confidence, evidence and links to supporting information. After another successful check, query findings use valid matched interval counters when available; the displayed scope states exclusions. Frequent requests are considered alongside mean latency. Ambiguous identities and reset counters do not produce comparisons. PostgreSQL idle-transaction warnings use time since the state changed, configurable with Use Check again after a change to save a baseline and compare after a representative workload. Different workloads can invalidate causal conclusions. Copy report for my developer omits SQL and usernames; object names and collection notes remain, so review before sharing. Copying never sends anything. Clearer setup and comparisons in 1.9Connection-link setup checks the scheme and shows the detected engine before connecting. Use the optional Show password or connection link checkbox to inspect a typo; credentials are masked again and cleared when setup closes or succeeds. Login details include engine-specific guidance. Switching methods ignores inactive fields, including an invalid port from the other method. A successful quiet comparison clears historical query warnings and reports insufficient recent activity. Only finite, nonnegative, consistent counters with matching query identity and text produce interval results. Unmatched or reset patterns remain excluded; a quiet interval is not proof that the entire database is healthy. |