Some interfaces and earlier documentation use the name PawSQL Advisor. Search for either PawSQL Client or PawSQL Advisor during installation, and expect existing context-menu commands to retain the PawSQL Advisor name.
Goal
Install and configure PawSQL Client for JetBrains so you can optimize the current SQL statement or batch-analyze SQL files, directories, and MyBatis Mapper input.Prerequisites
A compatible IntelliJ Platform IDE and access to the JetBrains Marketplace (or an offline plugin package supplied by PawSQL or an approved internal repository) are required before installing the plugin and running optimization.Supported IDEs
The plugin supports IntelliJ Platform products including IntelliJ IDEA, DataGrip, PyCharm, GoLand, WebStorm, PhpStorm, DataSpell, and Android Studio. Check JetBrains Marketplace for current product and version compatibility.Install the plugin
Install from the JetBrains Marketplace; see Install IDE Extensions for steps. After installation, open a SQL file or project directory and confirm that PawSQL Advisor actions appear in the context menu. If your network cannot reach Marketplace, use only an offline package supplied by PawSQL or an approved internal repository. Verify compatibility across the IDE, plugin, and PawSQL Server versions.Configure input and optimization
PawSQL Advisor provides project-level settings. Common options include:
Mapper analysis expands dynamic branches into possible SQL combinations. Poorly constrained Mapper logic can generate statements that never run in the application and lead to irrelevant index recommendations. Review dynamic conditions before a batch task.
Configure database context
A database connection can supply tables, views, columns, indexes, and statistics, and it can support performance validation. Configuration typically includes the engine, host, port, username, password, default database, and database or schema scope.Configure index recommendations
Align these controls with your engineering policy:- deduplication against existing indexes;
- whether covering indexes may be recommended;
- maximum columns in a covering index;
- maximum columns in a standard candidate index;
- the warning threshold for indexes per table.
Optimize selected SQL
1
Select a complete statement
Select one complete SQL statement without adjacent statements, logs, or Markdown fences.
2
Start optimization
Right-click and choose PawSQL Advisor > Optimize Selected.
3
Adjust this run if needed
Choose Optimize Selected Config… to change settings before submission.
4
Monitor execution
Use the IDE console to inspect parsing, connectivity, and optimization progress.
5
Open the result
Review the generated summary and statement-level details when processing completes.
Screenshot placeholder · /images/dev-tools/jetbrains-optimize.png
PawSQL Advisor actions in the context menu
Optimize a file or folder
Right-click a SQL file or directory and choose PawSQL Advisor > Optimize. Use Optimize Config… to change settings before the run. Before batch optimization, confirm:- the input type matches the files;
- encoding and SQL delimiters are correct;
- generated files, backups, and unrelated logs are excluded;
- the workspace or connection represents the target environment;
- the batch size fits current service limits.
Read the result
After completion, the plugin generates and opens apawTuningSummary Markdown file. It commonly contains:
- task overview and processed SQL inventory;
- recommended-index summary;
- original and rewritten SQL with applied rewrite strategies;
- rule findings and affected SQL fragments;
- existing-index, redundant-index, and index-count observations;
- performance improvement and before-and-after plans when validation is enabled.
Screenshot placeholder · /images/dev-tools/jetbrains-summary.png
Optimization summary file pawTuningSummary
Verification
After a run, confirm that thepawTuningSummary file opened and that the task overview, rewrite candidates, index recommendations, and any validation evidence appear as expected.
Before applying a recommendation
- Verify result, parameter, and transaction semantics.
- Check candidate indexes for overlap or conflict with existing indexes.
- Account for write, storage, and maintenance costs.
- Validate plans with representative data and parameter values.
- Use code review, testing, and database change control for deployment.