2 ms·
The query planner and optimizer etc are still black boxes. As a table’s size grows the way a query runs or the query plan could change. In some systems if you h
by gigatexal 5y ago
The query planner and optimizer etc are still black boxes. As a table’s size grows the way a query runs or the query plan could change. In some systems if you have stale statistics on tables you can get weird performance.
The biggest hangup some devs see the DB like anything else and think lookups are O(1) when looking for a key. But btrees are more like O(log(n)).
- namibj 5y agoAll memory is O(log(n)) latency for cache misses, though. You really shouldn't need to worry about B Trees being used instead of hash maps or something like that. For joins, using sorted and even B Tree base data structures can even give asymptotic benefits due to being able to skip keyspace ranges, potentially even at higher levels of the B Tree.