Optimize how update stage guards against the Halloween problem during multi updates

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Execution
    • QE 2025-04-14, QE 2025-04-28, QE 2025-05-12, QE 2025-05-26, QE 2025-06-09, QE 2025-06-23
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Currently, the stage pessimistically assumes that any secondary index change during multi-update might lead to the Halloween problem, even if the changed index isn't used to scan the records (see `_updatedRecordIds` in UpdateStage). In most cases it means that if an update affects a secondary index, record ids of all updated records are temporarily stored by the stage, which might be quite a lot for some kinds of updates.

       

        1. 100k.svg
          2.44 MB
        2. flamegraph.svg
          526 kB
        3. flamegraph-1.svg
          2.44 MB

            Assignee:
            Unassigned
            Reporter:
            Irina Yatsenko (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated: