DataBaseX icon

DataBaseX -----

Eliminate database lag! Transparently cache SELECT queries in 0ms, detect N+1 loops, hunter RAM leak




DATABASEX
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
The ultimate tool for SQL optimization, monitoring, and protection
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
DataBaseX is a revolutionary Java Bytecode Agent that injects itself transparently into your JVM to monitor, secure, accelerate, and automatically optimize your server's SQL operations. Built for Java 21 and high-load production servers.

[​IMG] [​IMG] [​IMG]
[​IMG]

⚡ CORE FEATURES
────────────────────────────────────────────────────
  • Bytecode Instrumentor — Injects itself directly into the System ClassLoader. Zero dependencies, 100% transparent interception.
  • Smart Caffeine Cache — Eliminates redundant queries in 0.00ms. Boosted by O(1) reverse table indexing for lightning-fast invalidations.
  • WAF Anti-Flood Firewall — Protects your database by instantly blocking infinite SQL loops and runaway queries before they lag MySQL.
  • Post-Crash Resilience — Buffers and secures writes during database outages, automatically flushing them back when the SQL server goes back online.
  • Auto-Repair Leak Hunter — Monitors JDBC connections in RAM and forces unclosed Statements to close, saving your server from slow RAM leaks.
  • Live "htop" SQL Monitor — Track active background queries and threads in real-time with the /dbx active dashboard.
  • N+1 Loop Detector — Automatically warns administrators when a plugin executes hundreds of similar queries sequentially.
  • Global SQL Provider — Centralizes MySQL configuration. Third-party plugins can use a shared pool without knowing your DB passwords.
  • Namespace Magic — Automatically isolates tables per plugin (e.g. `stats` becomes `dbx_lootglow_stats`) to prevent any collision.
  • Single-Flight Coalescer — Merges multiple identical, simultaneous SQL queries into a single network packet to reduce SQL load.
  • Oracle Explainer — Provides precise in-game diagnostic and indexing recommendations for your slow queries using /dbx explain.
  • Warm Boot Cache — Persists RAM cache to disk upon shutdown and restores it immediately on startup for instant warm performance.

WHY CHOOSE DATABASEX?
────────────────────────────────────────────────────
  • Industrial-Grade Reliability — Database instability is the #1 cause of high-population server lags and rollbacks. DataBaseX acts as an unbreakable shield between your plugins and your database.
  • Unprecedented Visibility — No more guessing which plugin is slowing down your server. With live dashboards and automatic stacktrace pinpointing, you'll find the culprit in seconds.
  • Modern Java 21 Native — Fully compatible with the latest JDK 21 restrictions and running Paper/Folia without triggering any Unsafe or security warnings.

️ COMMANDS
────────────────────────────────────────────────────
/dbx General plugin status and cache performance metrics.
/dbx active Launches the real-time SQL active query dashboard (htop).
/dbx top Display the Top 10 slowest SQL queries executed since boot.
/dbx explain <sql> Analyzes an SQL SELECT query and gives indexing optimization advice.
/dbx purge Instantly purges all stored cache entries and index mappings.
/dbx reload Reloads cache TTL parameters and anti-flood threshold rules.


CONFIGURATION
────────────────────────────────────────────────────
Below is an overview of the fully-documented config.yml generated on launch:

Code (YAML):
[/COLOR ]
# ======================================================
#              DataBaseX - Official Configuration
# ======================================================

# Threshold (in milliseconds) to classify a query as "Slow".
# If an SQL query exceeds this value, it will be saved in `/dbx top`
# and DataBaseX will run an automatic Oracle Explain analysis.
slow-query-threshold-ms
: 10.0

# Enable a console warning if an SQL query is executed directly
# on the "Main Thread" (blocking server TPS). Highly recommended.
alert-main-thread-queries
: true

# Maximum idle time (in ms) before a JDBC Statement is considered a "Leak"
# and is force-closed by the Leak Hunter (Auto-Repair).
# Default: 5 minutes (300,000 ms).
auto-repair-leak-threshold-ms
: 300000

# ======================================================
#           Advanced SQL Cache Engine (Caffeine)
# ======================================================
cache
:
  # Default Time To Live (TTL) for database records in cache (seconds).
  # Recommended: Between 5 and 10 seconds for optimal balance.
  default-ttl-seconds
: 5

  # Per-table precise rules.
  # Define custom TTL for specific tables, or set to '0' to EXCLUDE a table from cache.
  # Table names must be defined in lowercase.
  rules
:
    luckperms_players
: 60       # Cache of 60s (data that rarely changes)
    towny_residents
: 30
    essentials_userdata
: 10
    jobs_jobs
: 2
    economy_balances
: 0         # EXCLUSION: Balances must always be read live!

# ======================================================
#           SQL Anti-Flood Firewall (WAF)
# ======================================================
firewall
:
  # Maximum tolerance threshold: Number of IDENTICAL queries
  # allowed within a single second on the same thread.
  # If a plugin is stuck in an infinite loop, DataBaseX cuts the flow
  # and throws an SQLException to save MySQL from crashing.
  # Recommended value: 100.
  max-queries-per-second
: 100

# ======================================================
#       Universal SQL Provider (Centralized MySQL)
# ======================================================
# If enabled, DataBaseX boots a shared HikariCP connection pool.
# Third-party developers can call DataBaseXAPI.getConnection()
# without storing passwords or credentials in their own plugin configs!
database-provider
:
  enabled
: false
  host
: "localhost"
  port
: 3306
  database
: "minecraft"
  username
: "root"
  password
: "your_password_here"
 
  # Global pool tuning settings
  pool
:
    maximum-pool-size
: 20
    minimum-idle
: 5
[COLOR= #000000]

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Questions? Suggestions? Join us on Discord!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Resource Information
Author:
----------
Total Downloads: 18
First Release: May 14, 2026
Last Update: May 24, 2026
Category: ---------------
All-Time Rating:
1 ratings
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings