Tag Archives: mongo

mongo mongoshell query examples

mongo mongoshell query examples

db.MYTABLE.find()
db.MYTABLE.find({}).count
db.MYTABLE.find({}).limit(10)
db.MYTABLE.find({"name":"a"})
db.MYTABLE.find({"name":"a"},{name:1})
db.MYTABLE.find({"name":"a"}).sort({name:1})
db.MYTABLE.remove({"name":"a"})

 

#MySQL to #Mongo DB check min reqs before you swap #dba

In order to avoid the Mongo DB error

WARNING: soft rlimits too low.

Mongo DB needs rlimits set to

  • 1024 processes
  • 64000 files
  • Number of processes should be at least 32000 (0.5 times number of files)

So follow these instructions