If insertion order is important to your application -- and nothing in your post suggests it ought to be -- maybe you should consider using a 'Capped collection':
Capped collections MongoDB supports fixed-size collections called capped collections. This type of collection maintains insertion order and, once the specified size has been reached, behaves like a circular queue.
In reply to Re: MongoDB insert order
by BrowserUk
in thread MongoDB insert order
by PhilipJ
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |