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:
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:
And here’s more ODM bench:
The source for all these benchmarks is freely available on github.