3 ms·
So if I understand this correctly, the original article [1] shows that the mongodb queries being used rely on doing projections and selections on the data, then
by chris_wot 13y ago
So if I understand this correctly, the original article [1] shows that the mongodb queries being used rely on doing projections and selections on the data, then they apply aggregations.
However, unlike a relational engine which uses a query plan, you need to actually tell the aggregation engine in which order to process the data.
Doesn't this seem a little... backward? If the dataset is complex enough, the two things that come to mind are:
1. There would be a lot of redundancy in the hierarchical dataset.
and
2. That seems like a lot of futzing around to get the most optimal aggregation path!
What am I missing here?
p.s. I do tend to agree that the SQL syntax is rather more readable, but then again I've been looking at SQL for a lot longer than I have JSON style queries. The first query is not that unreadable!
1. http://thecodebarbarian.wordpress.com/2014/02/14/crunching-30-years-of-nba-data-with-mongodb-aggregation/ http://thecodebarbarian.wordpress.com/2014/02/14/crunching-3...