Limit memory usage of $range in SBE engine

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Execution
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      $range generates an array by enumerating all integers in [start, end) with the given step, materialising the full array in memory at once. With a large range (e.g. {$range: [0, 10000000, 1]}), the resulting array can exhaust available memory.

      In the SBE engine, $range is implemented by the builtinNewArrayFromRange.

            Assignee:
            Unassigned
            Reporter:
            Foteini Alvanaki
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: