# 一个有意思的 Rust 开源项目：learned\_index\_lab，尝试用数学模型替代传统 B\+Tree 索引

- 原标题：一个有意思的 Rust 开源项目：learned\_index\_lab，尝试用数学模型替代传统 B\+Tree 索引
- 类型：项目
- 来源：GitHub
- 发布时间：2026-10-16
- 首次精选：2026-11-03 09:31
- 分级：值得看
- 是否付费：免费（公开仓库）
- 预估学习时长：未知
- 学习层级：深入
- 主题：[rag-search-retrieval](<https://oplearnx.com/md/topics/rag-search-retrieval.md>)（第 51 位）
- 原文链接：[https://github.com/gilnett/learned\_index\_lab](<https://github.com/gilnett/learned_index_lab>)
- 本站页面：[https://oplearnx.com/resources/pk\_40c3011ea86f](<https://oplearnx.com/resources/pk_40c3011ea86f>)

## 摘要

一个 Rust 开源项目，基于 PGM-Index 算法，用分段线性模型预测数据位置再做局部精确查找，无需神经网络训练和 GPU。材料称其 Benchmark 在百万级数据下相比 Rust BTreeMap 构建速度提升约 22 倍、命中查询提升约 3 倍，索引元数据占几 KB 到几十 KB，并提到可能适合时序数据库、日志检索、RocksDB SSTable 等大规模有序、读多写少场景，同时注明项目仍处于研究型阶段、不适合生产环境。适合对索引结构、存储引擎和 Rust 高性能实现感兴趣的人了解。

## 热度

- 档位：有热度
- 7 天新增 star：+5
- 30 天新增 star：暂无数据
- Hacker News：没有
- 社区讨论：1 帖

## 项目信息

- 语言：Rust
- 许可：Apache-2.0
- 最近提交：2026-11-03
- Star：166
- Fork：5

## 上手方式

```bash
# Clone the repository
git clone https://github.com/gilnett/learned_index_lab.git
cd learned_index_lab

# Run the unit test suite with thread isolation
cargo test --release -- --test-threads=1

# Execute the full 10-run release benchmark across all 5 targets
cargo run --release

# Run isolated benchmarks on specific targets (including Multilevel PGM)
cargo run --release -- --target multilevel,pgm --runs 10
cargo run --release -- --target pgm,multilevel --suite sosd

# Run the batch ingestion and rebuild benchmark (SSTable merge vs BTree in-place)
cargo run --release -- --batch --batch-size 100000
```

摘自 [README](<https://github.com/gilnett/learned_index_lab/blob/main/README.md>)

---
来源：LearnMap · 学径（https://oplearnx.com）
