People are seeing real world MongoDB performance largely because MongoDB allows you to query in a different manner that is more sensible to your workload.įor example, consider a design that persisted a lot of information about a complicated entity in a normalised fashion. After all, MySQL and MongoDB are both GPL, so if Mongo had some magically better IO code in it, then the MySQL team could just incorporate it into their codebase. If you store the same data, organised in basically the same fashion, and access it exactly the same way, then you really shouldn't expect your results to be wildly different. While ($row = mysql_fetch_array($result) ) Sample Code For Testing MySQL executeSQL($sql) $time_taken = $time_taken + ($time_end - $time_start) Sample Code Used For Testing MongoDB swalif I have 20 partitions on MySQL each of 1 million records.I have dual core + ( 2 threads ) i7 cpu and 4GB ram. Is there something I am doing wrong? I know that my tests are not perfect but is MySQL on par with MongoDb when it comes to read intensive chores. I ran the query about 1,000 times each for mysql and MongoDB and I am suprised that I do not notice a lot of difference in speed. I wanted to compare speed with MongoDB and I ran a test which would get and print 15 records randomly from our huge databases. I had a table called posts in MySQL with about 20 million records indexed only on a field called 'id'. I have been very excited about MongoDb and have been testing it lately.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |