MongoDB: Map-Reduce-mysql tutorial

Source: Internet
Author: User
Tags mysql tutorial
Map-reduce is a data processing program (paradigm) that considers large data to obtain useful aggregation results ). for map-reduce operations, MongoDB provides mapreduce commands. consider the following map-reduce operation: in MongoDB, the map-reduce Operation uses a custom function to map or associate keys. If

Map-reduce is a data processing program (paradigm) that considers large data to obtain useful aggregation results ). for map-reduce operations, MongoDB provides mapreduce commands. consider the following map-reduce operation: in MongoDB, the map-reduce Operation uses a custom function to map or associate keys. If

Map-reduce is a data processing program (paradigm) that considers large data to obtain useful aggregation results. for map-reduce operations, MongoDB provides mapreduce commands.

Consider the following map-reduce operation:

JavaScript functions

In MongoDB, map-reduce operations use custom functions to map, or associate keys and values. If a key has multiple values corresponding to it, the reduce operation "removes" the value of the key to a single object (the operation causes CES the values for the key to a single object ).

Custom javascript functions provide flexibility for map-reduce. For example, when processing a document, the map function generates more than one key-value pair matching or no key-value pair matching. The Map-reduce function can also use a custom javascript function to modify the result at the end of map and reduce functions.

Map-Reduce action

In MongoDB, the map-reduce function can write results or return results to the set online. If you write the map-reduce output to a set, you can execute subsequent map-reduce operations on the same input set, and merge and replace the operations, or cut the previous results.

When the result of the map-reduce operation is returned online, the result Document must be within the BSON Document Size limit, which is currently 16 MB.

MongoDB supports map-reduce operations on shared sets and outputs results to shared sets.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.