Inspired by a benchmark of MongoDB versus SQLite by Jeremy Evans, the famous author of Sequel, here is a benchmark of MongoDB via the mongo ruby driver versus Sqlite via Sequel:
![](/images/experiments/charts/2010-07-24-mongo-versus-sqlite.png)
The faster “select alls” can be easily explained: SQLite ids are simple integers whereas mongo ids look like this:
BSON::ObjectID('4c4b20a41a221842e3000002')
So there’re simply more data the gather each time. Sqlite is quite fast in fact, but don’t forget that it offers neither concurrency nor scalability.
More interesting is the following chart featuring MongoMapper versus Mongoid versus plain mongo ruby driver:
![](/images/experiments/charts/2010-07-24-mongomapper-versus-mongoid.png)
And here’s more ODM bench:
![](/images/experiments/charts/2010-07-27-mongomodel-vs-candy-vs-mongorecord-vs-mongodoc.png)
The source for all these benchmarks is freely available on github.