You Can’t Just Plug In a Vector Index
Making Vector Indexes Work in Relational Databases
Lessons from SQL Server + DiskANN
Krithika Subramanian, Microsoft
Next Database Imperative: Vector Search in OLTP Systems
ASPECT | CHALLENGE/NEED | IMPLICATION |
Industry Need | Vector search is core to AI workloads such as semantic search, RAG, and recommendations. | Enterprises want native vector search in OLTP systems to support AI features. |
Existing Indexes | Current vector indexes are not suitable for real-time transactional updates. | |
OLTP Challenges | ANN indexes are graph-based and expensive to update. | Low-latency and high concurrency DML are required, which breaks graph indexes. |
Engine Optimization | Relational engines favor B‑trees and columnar scans. | Random access of adjacency lists in graph indexes is inefficient for OLTP. |
Why “Just Plugging in ANN” into OLTP systems Doesn’t Work
Our Solution: Design Principles That Make It Work
Why naïve ANN fails in DB systems | SQL Design Principle (Our solution) |
ANN systems assume in-memory / specialized infrastructure, not general-purpose DB engines | Reuse relational infrastructure wherever possible�→ Represent index as internal tables + SQL operators, leveraging existing storage, logging, and recovery |
ANN indexes (graphs) do not integrate cleanly with SQL query model (joins, filters, composability break) | Vector search must be a first-class system feature |
ANN graph structures are not transactional and cannot support OLTP-style updates | Decouple transactional DML from expensive graph mutation� |
staleness vs performance tradeoff for search | Separate base data, staging, and index structures explicitly�→ Combine graph traversal + staged row scan at query time |
Approximate search introduces unclear correctness guarantees | Make approximation controllable and observable�→ Explicit parameters + exact re-ranking |
Why DiskANN ? – Introducing other Alternatives as well
Core Question
Which ANN algorithm works inside a transactional, disk-backed database?�
Evaluation Lens Must work with disk + limited memory
Must scale to 10M–1B vectors
Must support incremental build / async ingestion
Must balance recall, latency, and storage
In memory graphs are not disk friendly, high memory footprint
Why DiskANN Fits ?
System Overview — Rebuilding ANN for SQL
Solving “Mutable Data Breaks ANN”
Solving “Stale or Wrong Results”
Solving “ANN Doesn’t Compose with SQL”�
Performance Benchmark – Comparative results, Benefits
Key Takeaways
“Making ANN work in a database is not about better search algorithms — it’s about reconciling approximation with transactions, composability, and system invariants.”