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

Implement heuristic for evaluating most performant operators first inside $and

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Major - P3 Major - P3
    • None
    • None
    • Querying
    • Query Execution

    Description

      The basic idea is that if the doc is

      { a:0 }

      and the query is

      { a:1, $where:... }

      then we should reject on the basis of 'a' before evaluating the $where clause (slow).

      In the old Matcher, $and checks:

      • simple operators eg equality, $gt, $in
      • then regular expressions
      • then nested compound expressions (nested $and, $or, etc)
      • then $where

      We can change the heuristics in the new implementation, but they should stay at least as good as the old ones.

      Attachments

        Activity

          People

            backlog-query-execution Backlog - Query Execution
            aaron Aaron Staple
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: