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

Query to return every Nth value from the collection

    • Type: Icon: New Feature New Feature
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Querying
    • Labels:
      None
    • Query Optimization

      Various relational databases have all implemented their own methods to return every nth value from the database. It doesn't seem like MongoDB has the capability at all.

      My use case it storing a year's worth of data with second granularity. I want to graph an overview of the year and allow a drill down to smaller time granulations. Thus my year query would request every 10000th value (for example) while an hours worth would return every value. Both of these queries would return roughly the same amount of data so be worked with in the application.

      I realize you'd incur a lot of file seek times if you had to grab data spanning multiple files but I still need the capability.

            Assignee:
            backlog-query-optimization [DO NOT USE] Backlog - Query Optimization
            Reporter:
            jmthomas Jason Thomas
            Votes:
            4 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: