$multiply operations are slow.

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Incomplete
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Environment:
      Mongoose: 5.4.14
    • ALL
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      When using `$multiply` inside of an aggregate, the execution time of a query is increased dramatically.

       

      For example, on a 10,000 item match, it is up to 30x slower than the same aggregate with no `$multiply` calculations. For example, I am including two queries with the only difference being using or not using `multiply`. I would expect the calculation to be slower, but not by this order of magnitude.

       

      I have the queries stored in a file but I am not sure where to attach or send those files.

        1. diagnostic.data.tar.xz
          130.41 MB
        2. fast_query_explained.txt
          3.71 MB
        3. fast_query_no_multiply.json
          381 kB
        4. slow_query_explained.txt
          12.09 MB
        5. slow_query_with_multiply.json
          1.32 MB

            Assignee:
            Danny Hatcher (Inactive)
            Reporter:
            Ryan McQuen
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: