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

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

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • None
    • Query Optimization

    Description

      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

      Attachments

        Activity

          People

            backlog-query-optimization Backlog - Query Optimization
            louis.williams@mongodb.com Louis Williams
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated: