Boost MyBatis Development with MyBatis SQL Viewer: Install, Use, and Stress‑Test Your SQL

The MyBatis SQL Viewer plugin streamlines MyBatis development by converting XML to real SQL, offering parameter mocking, compliance and index checks, execution, stress testing, and both MyBatis and non‑MyBatis modes, all without repeatedly restarting the application.

Java Backend Technology
Java Backend Technology
Java Backend Technology
Boost MyBatis Development with MyBatis SQL Viewer: Install, Use, and Stress‑Test Your SQL

Introduction

mybatis‑sql‑viewer plugin provides capabilities such as converting MyBatis XML to real SQL, parameter mocking, SQL compliance checking, index analysis, execution, stress testing, and scanning.

Problems Addressed

SQL errors require application restart.

Mocking data for tests is cumbersome.

Uncertainty about SQL standards compliance, index usage, and performance.

Installation

IDEA Marketplace: search "mybatis sql viewer" and install.

Manual: download the latest zip from the releases page and install from disk.

Usage

Configure a datasource first; the plugin offers two modes.

Non‑MyBatis Mode

Write SQL directly in the Statement tab; the plugin validates syntax and compliance.

MyBatis Mode

Click the "sql" icon in mapper interfaces or XML files to generate mock parameters, then convert the XML to real SQL.

Features

SQL syntax validation.

Compliance checking against Alibaba Java Development Manual.

Index analysis and execution‑plan generation.

SQL execution with result set, execution info, and plan.

Stress testing with configurable concurrency, duration, and parameter models.

Stress‑test report showing TPS, latency percentiles, success rate, and more.

Table, schema, and index tabs for detailed inspection of tables, fields, and indexes.

Data mocking with various rules (random, lexicon, fixed, increment, regex, etc.) and preview.

Mock data cleanup to avoid polluting real test data.

Configuration

Preferences → Tools → Mybatis Sql Viewer.

Project Address

https://github.com/linyimin0812/mybatis-sql-viewer

mybatis-sql-viewer capability
mybatis-sql-viewer capability
stress test report
stress test report
SQLdatabaseTestingpluginMyBatisIDE
Java Backend Technology
Written by

Java Backend Technology

Focus on Java-related technologies: SSM, Spring ecosystem, microservices, MySQL, MyCat, clustering, distributed systems, middleware, Linux, networking, multithreading. Occasionally cover DevOps tools like Jenkins, Nexus, Docker, and ELK. Also share technical insights from time to time, committed to Java full-stack development!

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.