3 ms·
That’s a very simplistic view. For once: you _always_ have to deal with memory hierarchy as there is no way to fit all data to the fastest memory. So you need
by mkleczek 2y ago
That’s a very simplistic view.
For once: you _always_ have to deal with memory hierarchy as there is no way to fit all data to the fastest memory. So you need to design with this in mind.
Secondly: the point of databases is not to implement a single specific task efficiently but:
a) provide means to maintain data so that it is easy to implement many different tasks (both current and future)
b) to safely _share_ data between various tasks/programs/users
- kazinator 2y agoThere are all kinds of situations in which, if all your data fits into dynamic RAM, you don't have to give any other damn. (This is basically the bulk of the premise of technology like Python, for instance). Nobody ever rebooted their machine because it became unusable due to their L1 or L2 cache thrashing. You really have to care more about that particular hierarchy level transition, RAM to external storage, more than the others, because traditionally the transition is very steep, like suddenly hitting a brick wall of slowness. The higher levels hierarchies can be left to generic management mechanisms, like the hardware itself or compiler register allocations. The ram to storage transition is managed at run-time by software. Databases have to bypass the operating system version of that management, and provide their own, because it is so critical.