>>Interesting page :
http://www.mongovue.com/2010/11/03/yet-another-mongodb-map-reduce-tutorial/>>
>>According to the writer SQL execution was 100 secs; Mongo : 6.
>>
>>Wondering if this is a fair comparison - i.e. is the T-SQL used improvable ?
>
>Viv, first, SQL vs Mongo/MapReduce is definitely "apples and oranges". Actually more like apples and rice.
But still comes down to solving the same problem on two different DB systems.
>Second, this author acknowledged no indexes were used in the SQL example.
Also doesn't say whether indexes were used in the MongoDB version - but I'm not sure that's relevant in this example....
>Third, a very subtle point here - which RDBMS was the author using for the SQL test? It's MySQL. Hardly a great choice for large data. That leads to the next point:
Very true - I missed that.
>
>Fourth, if we do a product implementation vs product implementation, the product implementing SQL would get to use any native functions to further optimize. In the case of SQL Server, it has had geospatial data types and geospatial logic baked into the product since SQL 2008. That would dramatically change the SQL example.
Mongo also has a Geospatial type (with Indexing). Would be interesting to see how things worked out if both were using those.
>Finally - that suggestion at the end...." For example, you could open cursors in SQL and iterate through all the records in nested for loops"....this smacks of someone who doesn't understand a topic beyond the basics. Sorry, but I call 'em as I see 'em. :)
Smacks of someone like me :-}
>You don't compare an interpreted language to a product. Don't get me wrong - MapReduce has established a presence. But the premise of the comparison is faulty.
>
>Thanks for the link - it's a good example of one of the many things that can be done in the Big Data realm. Also a good exercise in how to set up a straw man.
Wish I had time to play with it. But, end of day, I think you are right. This particular example wasn't a fair comparison.
BTW I noticed that the SQL Geography data type is implemented as a CLR data type :-}