[SERVER-10691] Default order for a querry in a capped collection Created: 06/Sep/13  Updated: 09/Jul/16  Resolved: 07/Sep/13

Status: Closed
Project: Core Server
Component/s: Internal Client
Affects Version/s: 2.2.3
Fix Version/s: None

Type: Question Priority: Major - P3
Reporter: Ionut Slaveanu Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Fedora 16
CentOs 6.4


Participants:

 Description   

From these two web pages:
http://docs.mongodb.org/manual/core/capped-collections/
and:
http://docs.mongodb.org/manual/core/capped-collections/#capped-collections-options

it seems that the default order for a query in a capped collection is the natural order.

"If you perform a find() on a capped collection with no ordering specified, MongoDB guarantees that the ordering of results is the same as the insertion order."

Can you confirm that this applies also to the c++ driver?



 Comments   
Comment by Eliot Horowitz (Inactive) [ 07/Sep/13 ]

The default order is natural order (insertion order) for a capped collection.
This is regardless of what driver is used.

Comment by Ionut Slaveanu [ 06/Sep/13 ]

Can you tell what is the default order for a query in a capped collection?

Generated at Thu Feb 08 03:23:48 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.