-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Labels:None
-
Query Optimization
When window functions spill to disk, they sometimes are able to free unneeded records.
I originally advised that we not delete records because this can be impactful on the WT cache, however, this assumption was based on normal MongoDB writes. The SpillableCache has special cases where deleting old records may be beneficial:
- These temporary tables are not journaled, so there is no write amplification by deleting old records.
- We don't timestamp writes to these tables, so all writes are globally visible. As a result, when WT does take a checkpoint, it only needs to store one version of each document. Deleting unneeded records reduces the amount of data written to disk during checkpoints.