by _jmar777 · 14y ago · 0 comments
* Obligatory unscientific, probably not meaningful, etc. disclaimer.
Mongo Version: 2.2.0-rc1
Hardware: MBP, Snow Leapord, 2.2 GHz Intel Core i7, 8 GB mem
Data: Single collection with 500k records (machine generated time-series event data)
Query Pipeline:
[
{
$match: { ts: { $gte: 1293858000000, $lt: 1296536400000 } }
},
{
$group: {
_id: 'aggregations',
sum: { $sum: '$foo' },
num: { $sum: 1 },
avg: { $avg: '$bar' }
}
}
]
Results: The time range matched against above matches 42,466 documents within the collection. The average response time over 50 runs is 419ms. Not exactly "Big Data OLAP" stuff just yet, but plenty fast enough for most use cases involving reasonably small sets of data. Great job to the MongoDB team!By the way, if you (or anyone else for that matter) come up with useful benchmarks I'd love to get a copy of them at mathias@10gen.com. I have a few of my own, but I'd like to get some real-world workloads from the community to test potential optimizations against.
db.events.ensureIndex({ ts: 1 });
I'll try to clean up my benchmark code a little, throw it in a gist, and then I'll send it your way.