Re:How to make MongoDB not suck for analytics
by squirrelicus on Sunday July 01, 2018 @11:35PM
(#17439186)
Because queries, specifically those that aggregate, consume memory and CPU on the live prod db. Something a simple scan cursor doesn't do. If the resource consumption is prohibitive, which it often is in mongo, and your use case is non-realtime, it's typically better to script the aggregation outside the DB query (or query an ETL'd aggregation store that doesn't impact customers when you lock it up)
Edit: changed "offline" to "non-realtime"
Re:How to make MongoDB not suck for analytics
by twblalock on Monday July 02, 2018 @03:04AM
(#17439804)
You should at the very least be doing analytics queries on a replica, or you could be affecting the database performance (and the customer experience) in production.
But even if you did that, you'll find that you'll need joins and aggregations that are painful to do in Mongo yet trivial to do in a system that is designed for them.
Why not query the data directly in MongoDB?