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

Don't recompile each time $regex is evaluated when regex argument is a constant

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.1.10
    • Affects Version/s: None
    • Component/s: Querying
    • None
    • Fully Compatible
    • Query 2019-04-08, Query 2019-04-22, Query 2019-05-06

      This is follow-on work for SERVER-39695.

       

      Compiling a regex can be O(2^n) time (n being size of the regex). In most cases, users will probably run the same regex over and over. Recompiling the same regex over and over would be extremely silly, and in some cases may make the $regex operator completely useless.

            Assignee:
            arun.banala@mongodb.com Arun Banala
            Reporter:
            ian.boros@mongodb.com Ian Boros
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: