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

If you call count on a $near query it looks at all points, and is slow.

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • None
    • 2.3.2
    • Geo
    • None
    • ALL

    Description

      Working with ny openstreetview data (can be found in mongo-snippets/2dsphere/data) which results in 366440 entries.

      When doing a db.ny.find().count(), it returns instantly.

      If I do a db.ny.find({geo: {$near: {$geometry: {type: "Point", coordinates [any lng, lat ]}}}}).count()

      it hangs for a long time, and eats all of my memory.

      Attachments

        Activity

          People

            hari.khalsa@10gen.com hari.khalsa@10gen.com
            ian.bentley Ian Bentley
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: