[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["難以理解","hardToUnderstand","thumb-down"],["資訊或程式碼範例有誤","incorrectInformationOrSampleCode","thumb-down"],["缺少我需要的資訊/範例","missingTheInformationSamplesINeed","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-09-11 (世界標準時間)。"],[[["\u003cp\u003eKey Visualizer heatmaps use brightness to represent the intensity of values, with brighter colors indicating higher values relative to your database's usage, though bright colors don't inherently signify a problem.\u003c/p\u003e\n"],["\u003cp\u003eYou can adjust the heatmap's brightness, zoom into specific time periods or key ranges, and drill down into data by key prefixes to analyze performance issues more closely.\u003c/p\u003e\n"],["\u003cp\u003eKey Visualizer allows you to pin tooltips for detailed metric information, which can also help in taking screenshots or copying information.\u003c/p\u003e\n"],["\u003cp\u003eUsers can switch between different metrics to understand their database's performance, and the "Show Info Panel" feature allows for comparing multiple metrics simultaneously to find correlations.\u003c/p\u003e\n"],["\u003cp\u003eBy default the Key Visualizer shows \u003cstrong\u003eOps/s\u003c/strong\u003e metric for entity keys and \u003cstrong\u003eIndex Write Ops/s\u003c/strong\u003e metric for Index keys, however, you can switch to a different metric through the Metric dropdown.\u003c/p\u003e\n"]]],[],null,["# Exploring heatmaps\n\nThis page describes how to analyze the heatmap in a Key Visualizer scan so you\ncan identify the source of a Firestore in Datastore mode performance issue.\n\n\nBefore you read this page, you should be familiar with the\n[overview of Key Visualizer](/firestore/docs/key-visualizer).\nYou may also want to:\n\n- Learn how to [open a Key Visualizer scan](./keyvis-getting-started#viewing-scan).\n- See examples of common [entity key patterns](./keyvis-patterns) or [index key patterns](/firestore/docs/keyvis-patterns-index).\n\nAdjusting brightness\n--------------------\n\nKey Visualizer heatmaps use dark colors to indicate normal or low values, and\nbright colors to indicate high values. You can adjust the color scale to\nhelp you see patterns in the heat map.\n\nKeep in mind that for most metrics, Key Visualizer identifies which values are\n\"high\" and \"low\" based entirely on your database's usage. For example, if you\nperform 20 reads per second in a specific key range and 1 read per second in\nother key ranges, Key Visualizer uses a bright color for that specific key\nrange. Note that bright colors do not necessarily indicate a problem.\n\nTo adjust the colors that are used for different values, use the **+ / -**\nbuttons on either side of the **Adjust Brightness**\n*brightness_6*\nicon. When you increase the brightness, you lower the range of values that each\ncolor represents; when you lower the brightness, you increase the range of\nvalues.\n\nTo reset the brightness to the default setting, click the\n**Adjust Brightness** *brightness_6*\nicon .\n\nZooming in on time periods and key ranges\n-----------------------------------------\n\nWhen you open a heatmap, it displays values for the time period included\nin the scan and the range of active keys in your database. If you\nnotice an issue during a specific time period, or in a specific range of\nkeys, you can zoom in to examine the issue more closely.\n\nThere are several ways to zoom in or out:\n\n- Scroll up or down within the heatmap.\n- Click the **Rectangular Zoom** *crop* button, then click and drag to select an area to enlarge.\n- Press and hold the `Shift` key, then click and drag to select an area to enlarge.\n- Return to the previous area of the heatmap by pressing the `Backspace` or `Delete` key.\n- Zoom out to view the entire table by clicking the **Reset Zoom** *zoom_out_map* button or pressing the `R` key.\n\nDrilling down by key prefix\n---------------------------\n\nThe following section describes how to drill down using a entity key scan\nas an example. In case of index keys, the prefix changes to group of index keys.\n\nOn the left side of a heatmap, Key Visualizer organizes keys by the\nhierarchy of your database. You can use this\nto drill down into the data for specific ranges of keys.\n\nTo drill down into the heatmap's data for a group of keys that share a\ncommon prefix:\n\n1. Move the cursor over one of the levels in the key hierarchy that appears\n to the left of the heatmap.\n\n Key Visualizer highlights the area of the heatmap that shows this level of\n the hierarchy. It also shows the key prefix for all of the keys at this\n level.\n\n2. Click the level of the key hierarchy that you want to examine.\n\n Key Visualizer zooms in on this level of the hierarchy.\n\n3. Click another level of the key hierarchy to zoom in further, or press the\n `Backspace` or `Delete` key to return to the previous area.\n\nPinning details about a metric\n------------------------------\n\nAs you move your cursor over a heatmap, Key Visualizer displays a tooltip that\ncontains details about the metric that is under the cursor. You can pin this\ntooltip in place by clicking on the heatmap. Pinned tooltips show more detail\nabout the metric. Pinning a tooltip also makes it easier to take a screenshot of\nthe tooltip or copy information from the tooltip.\n\nSwitching metrics\n-----------------\n\nBy default, when you open a Key Visualizer scan, it displays the **Ops/s**\nmetric for entity keys, which gives you an overview of your usage pattern.\nTo switch to a different metric, click the **Metric** drop-down\nlist above the heatmap, then click the metric you want to view.\n\nIn case of index keys, it displays the **Index Write Ops/s** metric that gives\nan overview of index key usage.\n\nFor descriptions of each metric, see [Key Visualizer Metrics](./key-visualizer#Metrics).\n\nFinding connections between different metrics for entity keys\n-------------------------------------------------------------\n\nYou can view multiple metrics at the same time in Key Visualizer when you want\nto compare metrics or find correlations between metrics. For example, you might\nwant to see if hotspots on your **Ops/s** heatmap correlate with high\nlatency in your **Average write latency** heatmap.\n\nTo view multiple metrics and their values at the same time, click\n**Show Info Panel** near the top right corner. A list of metrics appears\nin a pane to the right of the scan.\n\nTo examine several metrics at once, use the following tools in the multimetric\npane:\n\n- To show or hide miniature heatmaps for all metrics, click `Expand All` or\n `Collapse All` at the top right.\n\n- To show an individual metric's heatmap, click the metric name.\n\n- To hide an individual metric's heatmap, click the metric name again.\n\n- To display a metric's heatmap in the main window, click the solid arrow at\n the left edge of the metric's title bar.\n\n- Hover over a miniature heatmap to see corresponding activity in the main view.\n\nTo compare different metrics for a key bucket at the same point in time, you can\npin a value in a scan, then switch to a different metric at the same point in\ntime:\n\n1. Point to a position of interest on the large heatmap in the main window.\n2. Click to pin the tooltip. The values in the side pane stay fixed to the key bucket and point in time you've pinned.\n3. To display a metric in the large heatmap, click the solid arrow on the left for that metric. The tooltip in the main window shows you the full details for that metric.\n\n| **Note:** Index keys provide only the **Index Write Ops/s** metric.\n\nWhat's next\n-----------\n\n- Learn to recognize [entity key patterns](./keyvis-patterns) or [index key patterns](/firestore/docs/keyvis-patterns-index).\n- Read about the [metrics you can view in a heatmap](./key-visualizer#Metrics)."]]