<story><title>Things I wish I knew about MongoDB a year ago</title><url>http://snmaynard.com/2012/10/17/things-i-wish-i-knew-about-mongodb-a-year-ago/</url></story><parent_chain></parent_chain><comment><author>dia80</author><text>Genuine question:&lt;p&gt;In what use cases does mongo kick mysql&apos;s ass?&lt;p&gt;I&apos;ve used it a couple of times in hobby projects and enjoyed not maintaining a schema. I read so many of these &apos;gotcha&apos; style articles and for example one commenter here wants to have a manual &quot;recently dirty&quot; flag to combat the master / slave lag mentioned in the article. I know it&apos;s faster (tm) but once you have to take in to account all this low level stuff you have to worry about yourself wouldn&apos;t it just be better to rent/buy another rack of mysql servers and not worry about it?&lt;p&gt;Look forward to learning something...</text></comment>
<story><title>Things I wish I knew about MongoDB a year ago</title><url>http://snmaynard.com/2012/10/17/things-i-wish-i-knew-about-mongodb-a-year-ago/</url></story><parent_chain></parent_chain><comment><author>nickzoic</author><text>The count({condition}) one is a worry.  I&apos;m guessing it is slow in the case where it has to page the index in in order to count it.  I wonder if it is still a problem where the index is used a lot anyway.  A fix in MongoDB would seem a lot better solution than having everyone implement their own hacky count-caching solution.&lt;p&gt;EDIT: Actually, looking at the bug reports, sounds like maybe lock contention on the index?&lt;p&gt;The master/slave replication problem seems bad but I think it can be worked around (for my particular project) with a flag on the user session ... if they&apos;ve performed a write in the last 30 seconds, set slaveOkay = false.  Users who are just browsing may experience a slight delay in seeing new documents but users who are editing stuff will see their edits immediately.</text></comment>