---
schema_version: "1"
id: 526cac3c10afd123d5e4a86a8c023b6c1e108beebb4e3998b3ea1beb8ceac4d7
title: Optimize a Query
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/analytics/264-0-0/bi_dashboard_step_optimize.md
canonical_url: https://help.salesforce.com/s/articleView?id=analytics.bi_dashboard_step_optimize.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 213cb19b6244c3ea4f76234f9b40716d32d8f54ca374d12248f873420b37cdf1
description: Queries can slow down your dashboard. Run a performance check on the queries to ensure that they’re running optimally. CRM Analytics identifies query bottlenecks and provides recommendations to improve query performance.
products:
  - CRM Analytics
  - Cross Cloud
release: "264"
---
# Optimize a Query

Queries can slow down your dashboard. Run a performance check on the queries to ensure that they’re running optimally. CRM Analytics identifies query bottlenecks and provides recommendations to improve query performance.

1. Open the dashboard in view mode.
    
    Because CRM Analytics analyzes query performance for the current layout only, ensure that you’re viewing the dashboard in the right layout. Performance can differ from one layout to another because layouts can have different widgets and interactions. If the dashboard contains multiple pages, CRM Analytics provides performance analysis for the current page.
2. Click the drop-down arrow for the widget that uses the query that you want to analyze.
    
    ![Show Details button](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-analytics-bi-264-0-0-production-enus/ec791473-f5b4-4f64-a656-9104f455d966/bi/images/bi/bi_dashboards_show_details_button.png)
3. Select **Show Details** for the widget.
    
    ![Tip](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-analytics-bi-264-0-0-production-enus/ec791473-f5b4-4f64-a656-9104f455d966/images/icon_tip.png)
    
    Tip To see the Show Details option for a list widget, enable the “Show explore action” widget property. The Show Details option doesn’t show for link, image, container, global filter panel, and text widget types because they don’t have queries.
    
    The query details summarize different parts of the query, like measures, filters, groupings, and the dataset on which its built.
    
    ![The step details shows information about the query as well as other factors that contribute to the total time required to populate the results of a step.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-analytics-bi-264-0-0-production-enus/ec791473-f5b4-4f64-a656-9104f455d966/bi/images/bi/bi_dashboards_step_details.png)
    
    The Last Run Metrics section identifies other factors that contribute to the total time required to populate the results of a query.
    
     
    | Last Run Metric | Description |
    | --- | --- |
    | Metadata | Number of milliseconds needed to retrieve the metadata for the datasets involved in the query. The metadata fetch only occurs the first time the query runs. |
    | Waiting | Number of milliseconds needed to resolve bindings to construct the query. |
    | Query | Number of milliseconds to run the query. Note that a run might execute the query or use cached results. |
    
    If CRM Analytics identifies a performance issue with the query, it shows a warning icon (![Warning icon](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-analytics-bi-264-0-0-production-enus/ec791473-f5b4-4f64-a656-9104f455d966/bi/images/bi/bi_dashboards_inspector_warning_icon.png)) next to the View Performance Details button (![View Performance Details button](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-analytics-bi-264-0-0-production-enus/ec791473-f5b4-4f64-a656-9104f455d966/bi/images/bi/bi_dashboards_inspector_ViewPerformanceDetails_button.png)), as the previous screenshot shows.
4. To view the performance issues and suggestions for resolving them, click ![View Performance Details button](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-analytics-bi-264-0-0-production-enus/ec791473-f5b4-4f64-a656-9104f455d966/bi/images/bi/bi_dashboards_inspector_ViewPerformanceDetails_button.png).
    
    The Performance Factors section shows all factors by which the query is evaluated. Ignore the factors with a green checkmark (![Green checkmark](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-analytics-bi-264-0-0-production-enus/ec791473-f5b4-4f64-a656-9104f455d966/bi/images/bi/bi_dashboards_inspector_green_checkmark.png)) because these issues don’t apply to the query.
    
    ![The modal shows 3 different issues with the lens\_1 step.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-analytics-bi-264-0-0-production-enus/ec791473-f5b4-4f64-a656-9104f455d966/bi/images/bi/bi_dashboards_inspector_step_recommendations.png)
5. Expand each factor with a warning icon to learn how to improve the query’s performance.

#### See Also

- [Best Practices for CRM Analytics Dashboard Performance](https://help.salesforce.com/s/articleView?id=analytics.bi_dashboard_performance.htm&release=264.0.0&type=5 "Design dashboards that load quickly. Fast dashboards keep users engaged and reduce load on your org.")