Optimizing Document Lookup: Making Atlas Search and Vector Search Up to 5x Faster
MongoDB, Thursday, November 12th, 2026
MongoDB engineers describe redesigning document lookup in MongoDB 9.0 to make Atlas Search and Vector Search queries up to 5x faster.
MongoDB explains that $search and $vectorSearch queries run in two stages: mongot finds and ranks matches, then mongod materializes the documents by _id through an internal stage called $_internalSearchIdLookup.
That stage built a new query plan and acquired collection resources for every returned document, and profiling showed about 30% of mongod CPU time went to planning and acquisition.
Engineers redesigned the path to remove redundant planning, reuse execution plans and amortize resource acquisition across lookups.
The result is up to 4.9x faster $search queries, 5.5x faster $vectorSearch queries and about 2.75x higher throughput under concurrency, and the changes shipped in MongoDB 9.0, enabled by default.