RepositoryC++CNChina
AL

alibaba/AliSQL

AliSQL is a MySQL branch originated from Alibaba Group. Fetch document from Release Notes at bottom.

6.0kstars
906forks
12issues
5views

Featured achievements

The project's latest awards

1
TINIX TRENDING·Topic: duckdb

#1 Repository of the month

1
TINIX TRENDING·Topic: vector

#1 Repository of the month

1
TINIX TRENDING·Topic: alisql

#1 Repository of the month

AliSQL Logo

AliSQL

Alibaba's Enterprise MySQL Branch with DuckDB OLAP & Native Vector Search

Battle-tested in Alibaba's production environment, powering millions of databases

GitHub Stars GitHub Forks License MySQL Version

Features • Quick Start • Docs • Roadmap • Contributing

简体中文 | English

Why AliSQL?

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.

200x Faster Analytics

DuckDB columnar engine delivers 200x speedup on analytical queries compared to InnoDB

Built-in HNSW algorithm supporting up to 16,383 dimensions for AI/ML workloads

100% MySQL Compatible

Use your existing MySQL tools, drivers, and SQL — zero learning curve

Key Features

FeatureDescriptionStatus
DuckDB Storage EngineColumnar OLAP engine with automatic compression, perfect for analytics workloadsAvailable
Vector Index (VIDX)Native vector storage & ANN search with HNSW, supports COSINE & EUCLIDEAN distanceAvailable
DDL OptimizationInstant DDL, parallel B+tree construction, non-blocking locksPlanned
RTO OptimizationAccelerated crash recovery for faster instance startupPlanned
Replication BoostBinlog Parallel Flush, Binlog in Redo, large transaction optimizationPlanned

Quick Start

Option 1: Build from Source

# 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 install

Option 2: Set Up a DuckDB Analytical Node

Step-by-step guide: How to set up a DuckDB node

Initialize & Start Server

# Initialize data directory
~/alisql/bin/mysqld --initialize-insecure --datadir=~/alisql/data

# Start the server
~/alisql/bin/mysqld --datadir=~/alisql/data

Usage Examples

DuckDB for Analytics

-- 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 complex analytics (200x faster than InnoDB!)
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 Search for AI Applications

-- Create a table with vector column
CREATE TABLE embeddings (
    id INT PRIMARY KEY,
    content TEXT,
    embedding VECTOR(768)  -- 768-dimensional vectors
) ENGINE=InnoDB;

-- Create HNSW index for fast ANN search
CREATE VECTOR INDEX idx_embedding ON embeddings(embedding);

-- Find similar items using cosine distance
SELECT id, content,
       COSINE_DISTANCE(embedding, '[0.1, 0.2, ...]') as distance
FROM embeddings
ORDER BY distance
LIMIT 10;

Build Options

OptionDescriptionDefault
-t release|debugBuild typedebug
-d <dir>Installation directory/usr/local/alisql
-g asan|tsanEnable sanitizer (memory/thread)disabled
-cEnable code coverage (gcov)disabled

Prerequisites: CMake 3.x+, Python 3, GCC 7+ or Clang 5+

Roadmap

Q4 2025  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
         [x] DuckDB Storage Engine  [x] Vector Index (VIDX)   [x] Open Source

2026     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
         [ ] DDL Optimization       [ ] RTO Optimization      [ ] Replication Boost
             - Instant DDL              - Fast Crash Recovery     - Binlog Parallel Flush
             - Parallel B+tree          - Minimize RTO            - Binlog in Redo
             - Non-blocking Locks                                 - Large TX Optimization

Documentation

DocumentDescription
DuckDB Integration GuideComplete guide for DuckDB storage engine
Vector Index GuideNative vector storage and ANN search
Release NotesWhat's new in AliSQL 8.0.44
Setup DuckDB NodeQuick setup guide for analytics

External Resources:

Contributing

AliSQL became open source in December 2025 and is actively maintained by Alibaba Cloud Database Team.

We welcome contributions of all kinds!

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

For bugs and feature requests, please use GitHub Issues.

RDSAI CLI — AI-Powered Database Assistant

RDSAI CLI Python 3.13+

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

👉 Get Started with RDSAI CLI

Community & Support

GitHub Issues

For bug reports & feature requests

Open an Issue

Alibaba Cloud RDS

Managed DuckDB analytical instances

Learn More

License

AliSQL is licensed under GPL-2.0, the same license as MySQL.

See the LICENSE file for details.

Star History

Star History Chart

Made with care by Alibaba Cloud Database Team

GitHub • MySQL • DuckDB

Similar Projects

Discover other similar projects and AI models.

RepositoryJava
dbeaver/dbeaver

Free universal database tool and SQL client

52.6k
Nov 30, 2026
RepositoryTypeScript
prisma/orm

The Prisma ORM: write your application in TypeScript with human-readable queries instead of SQL. Host your database on Prisma Postgres and your app on Prisma Compute.

47.8k
Dec 3, 2026
RepositoryGo
pingcap/tidb

TiDB is built for agentic workloads that grow unpredictably, with ACID guarantees and native support for transactions, analytics, and vector search. No data silos. No noisy neighbors. No infrastructure ceiling.

40.8k
Dec 1, 2026
RepositoryTypeScript
directus/directus

The flexible backend for all your projects 🐰 Turn your DB into a headless CMS, admin panels, or apps with a custom UI, instant APIs, auth & more.

38.8k
Dec 1, 2026
RepositoryTypeScript
typeorm/typeorm

TypeScript & JavaScript ORM for Node.js — supports PostgreSQL, MySQL, MariaDB, SQLite, SQL Server, Oracle, and more.

36.7k
Dec 3, 2026
RepositoryRust
t8y2/dbx

lightweight cross-platform database client for 100+ databases, including MySQL, PostgreSQL, SQLite, Redis, MongoDB, DuckDB, SQL Server, and Dameng. Built-in AI, MCP Server, CLI, desktop and Docker. | 轻量级跨平台数据库管理工具,支持 MySQL、PostgreSQL、SQLite、Redis、MongoDB、达梦等 100+ 数据库,提供桌面端、Docker、CLI、内置 AI 助手和 MCP。

32.3k
Dec 3, 2026
RepositoryJava
OtterMind/Chat2DB

Chat2DB is a free, cross-platform, local-first database client and SQL workspace for developers, DBAs, analysts, and data teams. Connect to 40+ databases, manage data, edit and run SQL, and use your own AI model to generate, explain, and optimize queries. Available on desktop, web, Docker, and CLI, with MCP support.

28.4k
Nov 11, 2026
RepositoryGo
dolthub/dolt

Dolt – Git for Data

25.0k
Dec 2, 2026
RepositoryTypeScript
chartdb/chartdb

Database diagrams editor that allows you to visualize and design your DB with a single query.

23.2k
Nov 1, 2026