[Open-source] A Web SQL Optimization and Transformation Assistant, browser-based, no need to install any client
![[Open-source] A Web SQL Optimization and Transformation Assistant, browser-based, no need to install any client](https://yy123.ink/api/img/1796366093397-oywr15.png)
1. Project Overview
MuOpt MuOpt
MuOpt is a Web SQL optimization and conversion assistant based on Spring Boot 3, single-file muopt.jar deployment, browser-ready, no need to install any client.
2. Open Source License
Licensed under MIT
3. Screenshots
Feature Screenshots
Login Page(Failed too many times, automatically locked for 30 minutes):
SQL Optimization · Manual Optimization(Index suggestions differentiated by orange / gray area, AI deep rewriting):
SQL Optimization · Scan Optimization(Background task, 8-way concurrent AI rewriting, can write back to source file with one click):
SQL Conversion · Manual Conversion(Single SQL dialect conversion, supports image OCR recognition and AI retouching):
SQL Conversion · Scan Conversion(Batch conversion of entire project, automatic .bak backup):
Data Source Configuration(Multi-connection mutual exclusion enabled, password encryption stored in database):
AI Model Configuration(Multi-model mutual exclusion enabled, supports connectivity detection):
SQL Execution Plan(Table / Tree / Graph three-view):
Personal Center(Password can be modified):
4. Feature Overview
Development Background
With the comprehensive deployment of fintech transformation in the government and enterprise industries, a large number of existing business systems need to be migrated from MySQL / Oracle to domestic databases such as DreamDB, Renmin University Gold Warehouse, and GaussDB, while daily development slow SQL also lacks a tool that does not depend on specific IDEs and can be used out of the box for troubleshooting:
- High SQL Optimization Threshold
Limited DBA resources, and front-line developers are difficult to judge whether to add an index to this SQL, add it to which columns; the execution plan is difficult to read, lacking intuitive visual comparison; - Fintech migration workload is huge
A project can have over a thousand scattered SQLs in MyBatis XML, Java annotations, and .sql scripts, manual rewriting of dialects is both tedious and easy to miss; - Internal network tool scarcity
Many units' internal networks cannot access online tools, and cloud services cannot pass security audits, a local tool that can be copied into the internal network and run directly is needed.
MuOpt (Mu Opt) is born to solve these three things:Provide a developer with a SQL optimization + ZhongChuang conversion Swiss Army knife that can be taken into the intranet。
Project introduction
MuOpt is a Web SQL optimization and conversion assistant based on Spring Boot 3, single-file muopt.jar deployment, browser-ready, no need to install any client.
Core capabilities overview:
- Intelligent index suggestions
Based on JSqlParser parsing AST, extract candidate columns from WHERE equal/range conditions, JOIN ON, ORDER BY, GROUP BY, and generate reasonable (combined) indexes; suggest differentiationOrange (to be created) / Gray (already exists), automatically verify after connecting to the data source -
Manual optimization: immediately analyze a single SQL statement by pasting it, and automatically downgrade to local rules if AI deep rewriting fails or times out - Scan optimization
Scan the project directory, extract MyBatis XML, Java strings, and annotation SQL (@Select/@Insert/@Update/@Delete), analyze each one and support one-click replacement (automatic .bak backup) - SQL ZhongChuang conversion
Manual/batch mode, rule engine completes 18 database dialect conversions (functions, types, pagination, auto-increment, date format strings) in milliseconds, with AI dialect polishing as a secondary review; scan conversion supports one-key transformation and rewriting of the entire project - AI deep optimization
(optional): support configuring multiple AI models (BaiLian / DeepSeek / OpenAI / Anthropic and various OpenAI compatible gateways), enable one at a time, and close the thinking chain of the reasoning model to prevent long SQL from being truncated - Data Source Configuration
(optional): ten or so database drivers are built-in, and after connecting, can perform index existence detection, redundant index detection (DROP suggestion), and large table driver judgment - SQL Execution Plan
After connecting to the data source, execute EXPLAIN, and provideTable / Tree / GraphThree views (similar to DBeaver), color by operation type (full table scan red, index green, JOIN purple), and provide cost evaluation - Account system
Login authentication (lock for 30 minutes after 5 consecutive failures), personal center self-service password reset, multiple users do not affect each other
5. Tech Stack
Tech Stack
| Components |
Technology |
| Backend |
Spring Boot 3.2, JSqlParser 4.9, HikariCP, JDK HttpClient |
| Frontend |
Vue 3 CDN + Element Plus CDN (pure HTML, no build tool) |
| Data storage |
H2 file library (./data) + Spring Data JPA; passwords / API keys use spring-security-crypto encryption |
| AI interface |
OpenAI compatible protocol (BaiLian / DeepSeek / OpenAI / internal network gateway) + Anthropic Messages protocol |
| Task queue / heartbeat / distributed lock / entity cache |
MySQL, PostgreSQL, Oracle, SQL Server, DB2, DM8, openGauss, KingBase, OceanBase, Hango, Yashan, etc. (all built-in, see below) |
| Build and Run |
Maven, JDK 17+ |
Supported Databases
SQL Conversion (Target Dialect, 18 kinds):MySQL, MariaDB, PostgreSQL, GaussDB, openGauss, KingBase, Hango, Vastbase, DM, Oracle, Yashan, SQL Server, DB2, OceanBase, TiDB, GBase, GoldenDB, Oscar
Data Source Connection:
| Database |
Type Identifier |
Driver |
Default Port |
| MySQL |
mysql |
mysql-connector-j (built-in) |
3306 |
| MariaDB |
mariadb |
mariadb-java-client (built-in) |
3306 |
| Oracle |
oracle |
ojdbc8 (built-in) |
1521 |
| PostgreSQL |
postgresql |
postgresql (built-in) |
5432 |
| SQL Server |
sqlserver |
mssql-jdbc (built-in) |
1433 |
| DB2 |
db2 |
jcc (built-in) |
50000 |
| DM8 |
dameng |
DmJdbcDriver18 (built-in) |
5236 |
| GaussDB |
gaussdb |
PostgreSQL Driver (PG Protocol) |
5432 |
| openGauss |
opengauss |
opengauss-jdbc (built-in) |
5432 |
| KingBaseES V8 |
kingbase |
kingbase8 (built-in) |
54321 |
| OceanBase |
oceanbase |
oceanbase-client (built-in) |
2881 |
| TiDB |
tidb |
MySQL Driver (MySQL Protocol) |
4000 |
| Hango |
highgo |
HgdbJdbc (built-in) |
5866 |
| Yashan |
yashandb |
yashandb-jdbc (built-in) |
5436 |
| Vastbase |
vastbase |
Default PostgreSQL Compatible Driver; Fill in jar path to use original factory driver |
5432 |
| Oscar |
oscar |
Default PostgreSQL Compatible Driver; Fill in jar path to use original factory driver |
8080 |
| GBase 8a |
gbase |
Need official driver jar (fill in local path) |
5258 |
| H2 |
h2 |
h2 (built-in) |
— |
| Customization |
custom |
Complete JDBC URL + Driver Class Name; Can specify local jar path, supports "scan jar" to automatically read driver class name and additional URL parameters |
— |
All built-in drivers come from Maven Central Repository and are packed into fat jar, ready to use. Libraries without public coordinates are handled as follows: TiDB / GaussDB use built-in compatible protocol drivers; Vastbase / Oscar use default PG compatible driver, can fill in official jar to switch to original factory driver; GBase 8a fill in official jar; others use "custom" type. When driver version does not match the site, fill in new version driver jar path on the data source to override, no need to repackage.
6. Source Code Repository
Open-source project address:
https://github.com/vfaner/muopt
Next steps