---
title: "Map-Reduce Visualizer"
description: "The MapReduce visualizer* allows inspecting the internal structure of a Map-Reduce index"
url: "https://docs.ravendb.net/6.2/studio/database/indexes/map-reduce-visualizer"
version: "6.2"
---

# Map-Reduce Visualizer

> RavenDB publishes an official agent skill for coding assistants at https://docs.ravendb.net/skills/ravendb/SKILL.md (also installable with `npx skills add ravendb/skills`). The skill describes itself as: "Read this before writing any RavenDB query, client call or /databases/ request. Covers server setup, document modelling, the Node.js, .NET and Python clients, RQL, indexes, vector search and AI agents. Code written from recall tends to run and return the wrong rows, because RQL resembles SQL and the clients take field names as plain strings."

## Map-Reduce Visualizer

> **Note**
>
> - The **MapReduce visualizer** allows inspecting the internal structure of a Map-Reduce index
>   by graphing the relations between the documents and the Map-Reduce results.
>
> - In this page:
>   - [Map-Reduce Visualizer Usage Flow](#map-reduce-visualizer-usage-flow)
>   - [Map-Reduce Visualizer for Big Data](#map-reduce-visualizer-for-big-data)

## Map-Reduce Visualizer Usage Flow

- **1.** Select a Map-Reduce index and the documents to view

![Figure 1. Select an Index](https://docs.ravendb.net/assets/images/map-reduce-visualizer-1-22f584884c6b594af69108345453c3e9.png)

- **2**. View the graphical representation of the documents and their related 'group-by' reduced key field from the index

![Figure 2. View relation](https://docs.ravendb.net/assets/images/map-reduce-visualizer-2-6a9255e3eaea6a4a3c021529a3bbca78.png)

- In the above example, the selected documents `orders/1-A, orders/27-A, orders/829-A`
  are related to the key: `companies/85-A`.  
  i.e. All 3 documents have the value **'companies/85-A'** in their **'Company'** field in the document body.

- Document `ordes/100-A` has the value `companies/21-A` in its 'Company' field.

- **3**. View the detailed view for the key reduced results

![Figure 3. Key details](https://docs.ravendb.net/assets/images/map-reduce-visualizer-3-253f2f180078dc1a29e5c40919b8eed4.png)

1. The **total** number of orders documents made that contain the key 'companies/85-A' - **which is 6**  
   and the **total** orders amount made by company 'companies/85-A' - **which is 2,272.75**

2. A detailed info of these aggregated values showing per document selected.  
   Note: per each document, the OrdesCount is **'1'**, as each company makes one order.

- **4**. View details of all entries

![Figure 4. All Entry details](https://docs.ravendb.net/assets/images/map-reduce-visualizer-4-bc543780a33639d879e501102da21756.png)

- A detailed view of **all** the entries in the index that have 'companies/85-A' for their key (the 'Company' field).  
  Only the selected documents are listed explicitly in the Source Document column.

## Map-Reduce Visualizer for Big Data

- **5**. Visualizer results for big data

![Figure 5. Big Data Tree](https://docs.ravendb.net/assets/images/map-reduce-visualizer-5-e0a8c091763f24e2ac76b29707dacfe8.png)

- Once past a certain size, RavenDB starts processing the Map-Reduce entries in a **treelike** fashion.

- **6**. Visualizer details for big data

![Figure 6. Big Data Details](https://docs.ravendb.net/assets/images/map-reduce-visualizer-6-69274336f04a904587e5d343ff99a0fa.png)

- When there is a lot of data for a particular key, RavenDB will **segment the data**,  
  so that a minimal number of aggregation operations is required.

- For example, consider an update to document `orders/77-A` in the above image.  
  First, the Map function is run on the updated document, giving a Map entry to write to **page #1047**.  
  Then, the Reduce function is run on this page, giving the final tally for page #1047.  
  We'll then recurse upward, toward **page #1391**, where the Reduce is run again.
