Production-Safe AI Database Performance Optimization & SQL Statement Tuning Platform
Current ReleaseTransforms SQLStudio into a production-safe database performance & SQL tuning platform: default PROD EnvMode read-only guard with slow bottleneck diagnostics, 1-click zero-PII local DEV+TEST twin cloning, 100K-row Zipf/skewed seeding + auto ANALYZE, 6-rule AST SQL rewriting + ESR+INCLUDE index advisor + Before/After EXPLAIN A/B benchmarks, HMAC-SHA256 dual-stage promotion ledger with 15-min single-use manual PROD approval, and 32-tool MCP expansion.
- EnvMode & Slow Diagnostics
Added `EnvMode::{Prod, Test, Dev}` defaulting to `Prod` (`read_only = true` enforced) with `linked_prod_id` lineage plus read-only `slow_diag` engine inspecting `pg_stat_statements` / `pg_stat_activity` / `performance_schema`, full-table `Seq Scan` offenders, dead-tuple bloat (`n_dead_tup`), stale stats, and Root Blocker lock trees.
- Local DEV+TEST Twins & Zipf Seed
Shipped `local_twin` (zero production disk usage, strips PII rows, clones DDL/FKs/indexes to embedded SQLite/DuckDB or loopback-only PG/MySQL) alongside `mock` batch seeder supporting `Uniform`, `HotspotZipf` (80/20), and `SkewedStatusTime` up to 100,000 rows/table with Kahn topological FK ordering and auto `ANALYZE`.
- AST Rewriter, ESR & A/B Bench
Implemented 6 deterministic AST SQL rewrite rules (`SARGABLE_DATE_RANGE`, `ARITHMETIC_PREDICATE_ISOLATION`, `NOT_IN_TO_NOT_EXISTS`, `OR_CONSOLIDATION_OR_UNION`, `KEYSET_PAGINATION_DEEP_OFFSET`, `IMPLICIT_CAST_AND_WILDCARD_OR_STAR`), `index_advisor` ESR+`INCLUDE` recommendations with absorbed redundant index detection & rollback DDL, and real `run_ab_sql_benchmark` Before/After EXPLAIN timing & disk-spill hotspot profiling.
- 32-Tool MCP & Dual-Gate Ledger
Expanded Full MCP from 26 to 32 tools (`diagnose_prod_bottlenecks`, `clone_prod_to_local_twin`, `seed_tuning_data`, `optimize_sql_statement`, `verify_sql_in_stage`, `request_prod_promotion`), persisted HMAC-SHA256 `promotion_verifications.json` proofs enforcing DEV + TEST passes plus a 15-minute single-use desktop manual grant, and synchronized USD-only Creem website & 5-locale rebrand.