Фото: Zorana Jevtic / Reuters
Copyright © 1997-2026 by www.people.com.cn all rights reserved
。PDF资料是该领域的重要参考
Every WHERE id = N query flows through codegen_select_full_scan(), which emits linear walks through every row via Rewind / Next / Ne to compare each rowid against the target. At 100 rows with 100 lookups, that is 10,000 row comparisons instead of roughly 700 B-tree steps. O(n²) instead of O(n log n). This is consistent with the ~20,000x result in this run.
Жители Санкт-Петербурга устроили «крысогон»17:52
$gt: [ { $size: "$variations" }, 2 ]