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

Allow limit to be pushed down to text stage in query plans

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major - P3
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: Backlog
    • Component/s: Text Search
    • Labels:
      None

      Description

      I have roughly 3.2 million documents and have created text index on one filed. It took me about an hour to complete index.

      I notice that search is very very slow. I'm executing following statement.

      db.messages.explain("executionStats").find({$text:{$search:"Unfortunately"}},{"body":1}).limit(2)
      

      and it's taking me roughly 2 minutes to return result which is not acceptable for any serious use. I have attached full explain output for your review.

      I'm wondering if there is any way to improve it's performance?

        Attachments

        1. dataset.txt
          0.5 kB
        2. explain_term_terribly (post_warmup).txt
          8 kB
        3. explain_term_terribly (pre_warmup).txt
          8 kB
        4. explain_term_unfortunately (post_warmup).txt
          8 kB
        5. explain_term_unfortunately (pre_warmup).txt
          8 kB
        6. explain.json
          11 kB
        7. getIndexes.txt
          0.8 kB
        8. messages-stats.txt
          8 kB
        9. mongodb-resources_usage.png
          mongodb-resources_usage.png
          12 kB
        10. mongodb-system-utilization.png
          mongodb-system-utilization.png
          12 kB
        11. mongodb-threads.png
          mongodb-threads.png
          30 kB
        12. questionnaire.txt
          0.6 kB
        13. sample_data_and_system_log.zip
          4 kB
        14. sample_doc.txt
          3 kB
        15. serverBuildInfo.txt
          1 kB
        16. systemInfo.txt
          0.2 kB

          Issue Links

            Activity

              People

              • Votes:
                1 Vote for this issue
                Watchers:
                11 Start watching this issue

                Dates

                • Created:
                  Updated: