How Does the Database Understand and Execute Your Query?
May 5, 2022Milvus

Summary
This post details the internal workings of Milvus's query execution engine. It explains how query expressions with scalar filtering are parsed using EBNF syntax, how an Abstract Syntax Tree (AST) is generated using ANTLR and the Expr package, and how the query is executed through a visitor design pattern on protobuf structures, resulting in a bitmask output. It also provides an example of a complex film query and its step-by-step processing.
More from the AI Data Storage Engine trail
- Milvus Snapshots: Point-in-Time Collection Views Without Copying Data
- Announcing Milvus 3.0: Lake-Native Vector Search and a More Powerful Retrieval Engine
- How to Recover Milvus Data After etcd Corruption Without a Backup
- Open Tag: An Open-Source Claude Tag for Claude Code and Codex
- How Force Merge Compaction Nearly Doubled Milvus Search QPS