TweetThere are a number of quarky little MongoDB commands and queries hidden in the docs, two of them are $size and $type. Does it really matter? $size that is … The $size operator matches any array with the specified number of elements. The basic use would be something like … > db.ideas.find( { votes : { $size: 2 } [...]
Browsing the archives for the Querying category
Easily Move Documents Between Collections or Databases
28 May, 2012 in Administration, Querying by JustinTweetDoes this senario sound familiar? The good news: your new super amazing mashup is becoming super popular, its getting featured on tech blogs and podcasts w00t! You’ve used MongoDB for your database backed and so things have been scaling pretty well, and your analytics you have been tracking are really adding up, like millions and millions [...]
TweetSince MongoDB will allow you to store more than just string and int values but also things like arrays … from time to time you might need to know how many items are in an array in your document. For example, say you have a hosting business and to make a good profit you need [...]
TweetOne query SQL users are pretty used to writing is DISTINCT with COUNT() to get the number if distinct (unique) rows that match a statement like … SELECT COUNT(DISTINCT(PageURL)) FROM LogTable; This rather simple query will get us back the number of unique PageURL’s in our LogTable … not an amazingly useful query but you get [...]
TweetSay you have a log of hits to your podcast, something like … { “_id” : ObjectId(“4c6c753800ae261d80000009″), “podcastID” : 1, “remoteUserIP” : “10.40.52.55″, “remoteUserSession” : “gpn1vz1crveoqtgtlbh1tgd1″, “remoteUserAgent” : “iTunes/9.2.1 (Macintosh; Intel Mac OS X 10.6.4) AppleWebKit/533.17.8″, “created” : { “date” : “8/18/2010″, “time” : “5:05:12 PM” } } To get a quick snapshot of hits [...]
Search LearnMongo
Follow Us on Twitter!
Sponsors
MongoDB Videos
Categories
- Administration (7)
- Announcements (3)
- Books (1)
- Drivers (1)
- GridFS (1)
- GUI (1)
- MongoLA (1)
- MongoSeattle (1)
- MongoSV (1)
- PHP (4)
- Q & A (3)
- Querying (8)
- Quick Tip (6)
- Ruby (1)
- Stackoverflow (1)
- Twitter (2)
-
Recent Posts
Archives
- May 2012 (2)
- November 2011 (1)
- October 2011 (1)
- August 2011 (1)
- April 2011 (1)
- February 2011 (1)
- January 2011 (2)
- December 2010 (2)
- November 2010 (1)
- October 2010 (3)
- September 2010 (1)
- August 2010 (10)

-
Checkout Variety: a schema analyzer for MongoDB (it can help you get all the field names in a collection for example) https://t.co/yDri5Hyp173 days ago via web -
@junjua_pk first off, get the 64 bit ver (mongodb-win32-x86_64-2.2.0) if you don't have it. Then check your logs & this http://t.co/u40Ke0sz237 days ago via Twitter for Mac -
Interesting: "MongoDB Sharding Visualizer" … http://t.co/nd6Lr2il251 days ago via Twitter for Mac -
The Labor Day weekend and release of MongoDB 2.2 has me pretty excited to get up a few new blog posts! #mongoDB2dot2 #inspiration264 days ago via Twitter for Mac -
Excessive #MongoDB Disk Space? http://t.co/SRm5FUj9278 days ago via Twitter for Mac

