Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8997195
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T23:51:21+00:00 2026-06-15T23:51:21+00:00

I am using MongoDB as DataBase for my application I have a question with

  • 0

I am using MongoDB as DataBase for my application

I have a question with respect to Mongo DB find operation .

Assume if i have two / three same records on a field say symbol in the collection present in the Database .

db.collection.find( { “symbol”: “GOOG” })

On What basis does the Mongo DB shows the First record ??

Edited part

I am having Mongo DB present in my Test Environment and as well as in Production Environment with the same data .

my question is ,

when i do

db.bios.find( { “name”: “FOOGY” } )

There is a difference in the Data that is displayed (the first record ) in two environments ??

Please let me know why there is a variation in the Data that is dislayed in two environments when issued the same commnad

db.bios.find( { “name”: “FOOGY” } )

Please let me know is there any thumb rule that what record should be sown first ??

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T23:51:22+00:00Added an answer on June 15, 2026 at 11:51 pm

    Unless you explicitly sort, it’s whatever order they happen to be stored in on disk (called natural order). If you care what the order of the returned records is, provide the sort option to your find.

    To address your updated question: yes, if you have the same docs stored in to separate MongoDB instances, they definitely can come back in a different from one another. Even a single MongoDb instance can return the docs in a different order over time as documents are relocated on disk due to updates.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an application using a MongoDB database and am about to add custom
I have an application where I'm using mongodb as a database for storing record
I have a web service application built using NodeJS. I am using mongodb as
I'm in the process of choosing database for my application. I have been using
I am developing a facebook application in Ruby on Rails using MongoDB as database.
I'm currently using MongoDB to record application logs, and while I'm quite happy with
I'm building a Route Planner Webapp using Spring/Hibernate/Tomcat and a mysql database, I have
I am using the latest spring-data-mongodb (1.1.0.M2) and the latest Mongo Driver (2.9.0-RC1). I
There is a microblogging type of application. Two main basic database stores zeroed upon
One of our project is using MongoDb and our database => collections are sharded.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.