Live data from Hacker News

Show HN: SQL to Mongo Query Translator

querymongo.com

31–34 of 34 posts

Re: Show HN: SQL to Mongo Query Translator

#31
post #24
post #7

The default query already filled in is translating to the use of a Group function, which is a very bad idea. While not deprecated per se, its use is discouraged. Group does not function in Sharding mode at all , it also takes a lock on the JavaScript interpreter making it non-parallelizable. Map/Reduce is somewhat better in that it is shardable, and with V8 likely in the next stable release, will have better parallel…

You're correct, however note that 2.3/2.4 fixes the lock on the javascript interpreter with the move to V8 as the default engine.

I noted v8 in my comment; it won't be a panacea. It certainly doesn't fix the encoding/decoding overhead of BSONJavaScript, but the JIT and multithreading will help in other areas.

Group still will not become sharding-capable with v8, either.

Re: Show HN: SQL to Mongo Query Translator

#33

I don't have any experience with MongoDB, but the example put me off using it completely. The MySQL query is concise and brief, the MongoDB equivalent is bloated. Only after several seconds I was able to deduce that the MongoDB query probably does something more than MySQL query. Can you please make the examples more comparable? Or did I misunderstand the MongonDB and it actually is so bloated by design? I believe it…

The default is a particularly perverse example. Most anything that involves aggregation or on-the-fly computation is better done in MySQL or similar. Typical Mongo usage is predicated on the assumption that you're going to denormalize your data into documents that are trivially queryable. Treating it like a SQL store is a mistake, and this query demonstrates exactly why.

Re: Show HN: SQL to Mongo Query Translator

#34
post #7

The default query already filled in is translating to the use of a Group function, which is a very bad idea. While not deprecated per se, its use is discouraged. Group does not function in Sharding mode at all , it also takes a lock on the JavaScript interpreter making it non-parallelizable. Map/Reduce is somewhat better in that it is shardable, and with V8 likely in the next stable release, will have better parallel…

Came here to mention the aggregation framework. +1
Post reply on HN