Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-57006

Delete unneeded documents that have been spilled to disk in window functions

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 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.

      CC ted.tuckman nicholas.zolnierz

            Assignee:
            backlog-query-optimization [DO NOT USE] Backlog - Query Optimization
            Reporter:
            louis.williams@mongodb.com Louis Williams
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: