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

$multiply operations are slow.

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Incomplete
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • None
    • Mongoose: 5.4.14
    • ALL

    Description

      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.

      Attachments

        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

        Activity

          People

            daniel.hatcher@mongodb.com Danny Hatcher (Inactive)
            rmcquen@funko.com Ryan McQuen
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: