Alibaba's Enterprise MySQL Branch with DuckDB OLAP & Native Vector Search
Battle-tested in Alibaba's production environment, powering millions of databases
Features • Quick Start • Docs • Roadmap • Contributing
AliSQL brings enterprise-grade capabilities to MySQL, combining the reliability of InnoDB OLTP with DuckDB's blazing-fast analytics and native vector search — all through familiar MySQL interfaces.
|
The included TPC-H SF100 reference results show more than 200x speedups over InnoDB on multiple queries |
Built-in HNSW algorithm supporting up to 16,383 dimensions for AI/ML workloads |
Keep using familiar MySQL tools, drivers, and SQL while adopting AliSQL extensions |
| Feature | Description | Status |
|---|---|---|
| DuckDB Storage Engine | Columnar OLAP engine with automatic compression, perfect for analytics workloads | Available |
| Vector Index (VIDX) | Native vector storage & ANN search with HNSW, supports COSINE & EUCLIDEAN distance | Available |
| Native Flashback | Query historical InnoDB data with AS OF TIMESTAMP and retained undo snapshots |
Available |
| Large TX Optimization | Binlog Cache Free Flush is implemented, but its optimized path is inactive in the standard DuckDB-enabled build | Inactive in standard build |
| Binlog Durability | Persist Binlog Into Redo V2 reduces synchronous binlog I/O while retaining crash recovery | Available |
| DDL Optimization | Instant DDL, parallel B+tree construction, non-blocking locks | Planned |
| RTO Optimization | Accelerated crash recovery for faster instance startup | Planned |
# Clone the repository
git clone https://github.com/alibaba/AliSQL.git
cd AliSQL
# Build (release mode)
sh build.sh -t release -d ~/alisql
# Install
make installStep-by-step guide: How to set up a DuckDB node
# Initialize data directory
~/alisql/bin/mysqld --initialize-insecure --datadir=~/alisql/data
# Start the server with DuckDB enabled for the example below
~/alisql/bin/mysqld --datadir=~/alisql/data --duckdb_mode=ON-- Create an analytical table with DuckDB engine
CREATE TABLE sales_analytics (
sale_date DATE,
product_id INT,
revenue DECIMAL(10,2),
quantity INT
) ENGINE=DuckDB;
-- Run an analytical aggregation through DuckDB
SELECT
DATE_FORMAT(sale_date, '%Y-%m') as month,
SUM(revenue) as total_revenue,
COUNT(*) as transactions
FROM sales_analytics
GROUP BY month
ORDER BY total_revenue DESC;-- Vector features are disabled by default and vector indexes require RC.
SET GLOBAL vidx_disabled = OFF;
SET SESSION transaction_isolation = 'READ-COMMITTED';
-- Create a table with a vector column
CREATE TABLE embeddings (
id INT PRIMARY KEY,
content TEXT,
embedding VECTOR(3)
) ENGINE=InnoDB;
INSERT INTO embeddings VALUES
(1, 'first document', VEC_FROMTEXT('[0.1,0.2,0.3]')),
(2, 'second document', VEC_FROMTEXT('[0.2,0.1,0.4]'));
-- Create HNSW index for fast ANN search
CREATE VECTOR INDEX idx_embedding ON embeddings(embedding) DISTANCE=COSINE;
-- Find similar items using cosine distance
SELECT id, content,
VEC_DISTANCE_COSINE(
embedding, VEC_FROMTEXT('[0.1,0.2,0.3]')
) AS distance
FROM embeddings
ORDER BY distance
LIMIT 10;| Option | Description | Default |
|---|---|---|
-t release|debug |
Build type | debug |
-d <dir> |
Installation directory | /usr/local/alisql when writable; otherwise $HOME/alisql |
-g asan|tsan |
Enable sanitizer (memory/thread) | disabled |
-c |
Enable code coverage (gcov) | disabled |
Prerequisites: CMake 3.x+, Python 3, GCC 7+ or Clang 5+
Q4 2025 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[x] DuckDB Storage Engine [x] Vector Index (VIDX) [x] 8.0.44 Release
2026 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[x] Native Flashback [x] Transaction & Binlog [ ] DDL / RTO
- AS OF TIMESTAMP - Binlog in Redo V2 - Instant DDL
- Undo snapshots - Free Flush* - Fast Crash Recovery
* The Free Flush implementation is present, but its optimized path is inactive in the standard DuckDB-enabled build.
| Document | Description |
|---|---|
| DuckDB Integration Guide | Complete guide for DuckDB storage engine |
| Vector Index Guide | Native vector storage and ANN search |
| Native Flashback Guide | Historical InnoDB queries and recovery |
| Binlog in Redo Guide | Redo-backed binlog persistence and fallback rules |
| Binlog Cache Free Flush Guide | Large-transaction optimization and current availability |
| Release Notes | What's new in AliSQL 8.0.44 |
| Setup DuckDB Node | Quick setup guide for analytics |
External Resources:
For managed production deployments, Alibaba Cloud RDS MySQL productizes selected AliSQL capabilities with service-managed kernel rollout, topology, synchronization, backup, monitoring, and support. RDS product requirements and parameter defaults can differ from this source branch; use the official product documentation for RDS instances.
| Capability | RDS MySQL product documentation |
|---|---|
| DuckDB analytical instances | English / 中文 |
| Vector storage | English / 中文 |
| Native Flashback | English / 中文 |
| Binlog Cache Free Flush | English / 中文 |
| Binlog in Redo | English / 中文 |
Each local feature guide documents the boundary between this source branch and its corresponding RDS commercial capability.
AliSQL has been open source since August 2016 and is actively maintained by Alibaba Cloud Database Team. The current 8.0.44 feature release continues that open-source line.
We welcome contributions of all kinds!
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
For bugs and feature requests, please use GitHub Issues.
RDSAI CLI is a next-generation, AI-powered CLI that transforms how you interact with AliSQL and MySQL databases. Describe your intent in natural language, and the AI agent handles the rest.
# Install
curl -LsSf https://raw.githubusercontent.com/aliyun/rdsai-cli/main/install.sh | sh
# Connect and ask in natural language
rdsai --host localhost -u root -p secret -D mydb
mysql> analyze index usage on users table
mysql> show me slow queries from the last hour
mysql> why this query is slow: SELECT * FROM users WHERE name LIKE '%john%'Key Features:
- Natural language to SQL conversion (English/中文)
- AI-powered query optimization and diagnostics
- Execution plan analysis with
Ctrl+E - Multi-model LLM support (Qwen, OpenAI, DeepSeek, Anthropic, etc.)
- Performance benchmarking with automated analysis
|
GitHub Issues For bug reports & feature requests |
Alibaba Cloud RDS Managed DuckDB analytical instances |
AliSQL is licensed under GPL-2.0, the same license as MySQL.
See the LICENSE file for details.
Made with care by Alibaba Cloud Database Team
