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

Using Indexes To Sort Huge Data

    • Type: Icon: Question Question
    • Resolution: Duplicate
    • Priority: Icon: Critical - P2 Critical - P2
    • None
    • Affects Version/s: 3.2.11
    • Component/s: Index Maintenance, Storage
    • Labels:
      None

      We have a large amount of data and applying pagination on it using below query:
      db.collection.find().sort(

      {<field>: 1}

      ).skip(<no. of docs to skip>).limit(<no. of docs to display at once>)

      But, I need to create something similar to clustered index i.e which can store sorted documents inorder to avoid in-memory sort at the time of query since the data set is large. Also, this needs to be done to reduce the execution time taken by the query.

      According to the search results, MongoDB does not support clustered index. So, is there any workaround for the same?

            Assignee:
            mark.agarunov Mark Agarunov
            Reporter:
            pratiksha.gupta38@gmail.com Pratiksha Aggarwal
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: