---
schema_version: "1"
id: 9830ac958ec5df600c1212808d3cf719cccc5262586aa21fe49e522fa3cb6161
title: Query Performance
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/analytics/bi_dev_guide_saql/guides/reference/bi-saql-performance.md
canonical_url: https://developer.salesforce.com/docs/analytics/bi-dev-guide-saql/guide/bi-saql-performance.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 76ca79c3e999f4f61e131a1123a9a79faff352b4137d2933dfdecc38ab71788f
products:
  - Analytics SAQL Developer Guide
  - analytics
---

# Query Performance

Here are some guidelines for structuring your queries to improve performance.

- **[Speed Up Queries with Dataflow Transformations](https://developer.salesforce.com/docs/analytics/bi-dev-guide-saql/guide/bi-saql-performance-dataflow-transformations.md)**


    To speed up your queries and reduce the number of network round trips, perform data transformations in the ELT process instead of in the query.

- **[Limit Multivalue Fields](https://developer.salesforce.com/docs/analytics/bi-dev-guide-saql/guide/bi-saql-performance-multivalue-fields.md)**


    Multivalue fields can cause poor performance. The behavior of these fields is undefined for `group-by` and `foreach` statements. If possible, write your query so that the fields are referenced only in filters.

- **[Use Group and Filter Pre-projection](https://developer.salesforce.com/docs/analytics/bi-dev-guide-saql/guide/bi-saql-performance-group-filter.md)**


    Improve query performance by moving group and filter operations on simple fields before the `foreach` statement. A simple field is projected as-is and doesn't have additional expressions.

- **[Remove Redundant Projections](https://developer.salesforce.com/docs/analytics/bi-dev-guide-saql/guide/bi-saql-performance-redundant-projections.md)**


    To improve memory usage and performance costs, remove unnecessary projections from your queries and load only the data required. If you have to perform an operation, include pre-projection statements as needed.

- **[Check for Redundant Filters](https://developer.salesforce.com/docs/analytics/bi-dev-guide-saql/guide/bi-saql-performance-redundant-filters.md)**


    Binding and faceting in your dashboard design can generate redundant filters. Check the SAQL queries that your dashboard produces to remove unnecessary filters. Consider how a filter in your dashboard UI interacts with one in your query and vice versa.

- **[Limit the Use of unique()](https://developer.salesforce.com/docs/analytics/bi-dev-guide-saql/guide/bi-saql-performance-unique.md)**


    `unique()` can affect query performance for large datasets that have over 100 million rows and include more than one million unique values. For large datasets, `unique()` is faster for measures than for dimensions. If counting the number of unique string values causes performance issues, convert the string to a number. For example, use a hash of the string value or refer to the index of the string in a sorted list of string values.

- **[arimax Show Parameters Query Tool](https://developer.salesforce.com/docs/analytics/bi-dev-guide-saql/guide/bi-saql-arimax-show-parameters.md)**


    The `showParams` parameter is provided for you as a query developer tool. It allows you to run an `arimax` query and review the model parameters and Bayesian Information Criteria (BIC) to understand the data better and improve query efficiency.
