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

ABT Constant value pooling for efficient copying

    XMLWordPrintableJSON

Details

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

    Description

      As uncovered by SERVER-80576, nearly 40% of the optimization time of large $in queries is spent in copying the constant array argument of $in. This copying happens because of the ABT and Cascades designs that require ABT (sub)-trees to be copied when they are processed somehow.

      One way to speed up such copies when an ABT query representation references large Constant objects is to avoid copying the Value that is contained inside the Constant.

      The idea is that when a Constant is created to hold a new Value, the Value is stored in a constant pool, and then each subsequent invocation of Constant's copy constructor creates a new Constant that references the original Value.

      This approach will likely benefit only large enough values such as strings and arrays.

      Attachments

        Activity

          People

            backlog-query-optimization Backlog - Query Optimization
            timour.katchaounov@mongodb.com Timour Katchaounov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: