简体   繁体   English

如何使用Django-nonrel的MongoDB mapreduce?

[英]How to use Django-nonrel's MongoDB mapreduce?

I'm just learning how to use Mapreduce and reading this documentation: http://django-mongodb.org/topics/mapreduce.html 我正在学习如何使用Mapreduce并阅读本文档: http ://django-mongodb.org/topics/mapreduce.html

But it says: MongoDB's Map/Reduce is designed for one-time operations, ie it's not intended to be used in code that is executed on a regular basis (views, business logic, ...). 但它说:MongoDB的Map / Reduce设计用于一次性操作,即它不打算用于定期执行的代码(视图,业务逻辑......)。

My question is right now: Where DO I use it? 我现在的问题是:我在哪里使用它? Are there any recommendations or something? 有什么建议吗? I really can't find it. 我真的找不到它。

Thanks a lot! 非常感谢!

It's difficult to predict how long mapreduce functions take (assuming you have large data), so they're a bad choice for say doing processing that is required to generate a web page view that many users often use. 很难预测mapreduce函数需要多长时间(假设你有大量数据),因此对于生成许多用户经常使用的网页视图所需的处理来说,它们是一个糟糕的选择。

It's useful for doing data analysis on your data, where you're willing to wait to get a result. 它对您的数据进行数据分析很有用,您愿意等待获得结果。 It's also useful for operating on large sets of data, like processes for updating every document in your database. 它对于操作大型数据集也很有用,例如更新数据库中每个文档的过程。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM