Skip to main content
PawSQL Client for VS Code brings SQL review, query rewrite, index recommendation, and performance validation into Visual Studio Code. It is designed for quick analysis of a current statement in a polyglot repository or standalone SQL file.

Goal

Install and configure PawSQL Client for VS Code to optimize SQL within source files and SQL scripts.

Prerequisites

A compatible Visual Studio Code installation and access to the Visual Studio Code Marketplace (or an offline extension package supplied by PawSQL or an approved internal repository).

Install the extension

Install from the Visual Studio Code Marketplace; see Install IDE Extensions for steps. After installation, open a file containing SQL and confirm that a PawSQL optimization action appears near the detected statement. In a restricted network, use only an offline extension package supplied by PawSQL or an approved internal software repository.

Connect to PawSQL

1

Open PawSQL configuration

Use the extension settings or command palette to open PawSQL Client configuration.
2

Set the endpoint

Enter the complete PawSQL Cloud or PawSQL Server URL.
3

Authenticate

Sign in or provide the credential required by your deployment. Keep passwords and tokens out of project files.
4

Choose a default workspace

Select a workspace that matches the target database engine, version, and schema.

Optimize a statement

1

Locate complete SQL

Open the source or SQL file and make sure the extension recognizes the full statement boundary.
2

Use the default workspace

Select Optimize from the SQL prompt to run the task with the configured default workspace.
3

Choose another workspace

Select Optimize… and choose the workspace for this task.
4

Open the result

Review the PawSQL findings, rewrite candidates, index recommendations, and performance evidence.
Optimize

Optimize action next to a SQL statement

If one repository targets several engines or environments, do not rely on one default workspace for every statement. Use Optimize… to select the context that matches the current SQL.

Read optimization results

The presentation may change between extension releases. Use this review order:
  1. Verify the original SQL and detected database dialect.
  2. Confirm the workspace and object resolution.
  3. Read findings, severity, and affected fragments.
  4. Evaluate rewritten SQL and the optimization rationale.
  5. Inspect candidate indexes and their relationship to existing indexes.
  6. Review plan or performance comparisons when validation is enabled.

Verification

Confirm the extension works by running an optimization and checking that the original SQL, detected dialect, workspace, findings, rewrite candidates, index recommendations, and any validation evidence are returned.

Apply a rewrite or index

Extension output is an optimization candidate, not a deployment instruction. Before applying it:
  • verify query results and business semantics;
  • test parameter types, null handling, and boundary values;
  • confirm target-version syntax support;
  • account for index write and storage cost;
  • validate plans under representative conditions;
  • follow code review and database change approval.
When validation requires database access or SQL execution, confirm the account permissions, target environment, and statement safety first. Do not use an unreviewed data-changing statement for the initial connection test.

Troubleshooting

Workspaces and Database Context

Input SQL to Optimize

Read Optimization Results

Evaluate and Apply Suggestions