# Recommendations overview

> [!WARNING]
>
> **Preview**
>
>
> This product or feature is
>
> subject to the "Pre-GA Offerings Terms" in the General Service Terms section
> of the [Service Specific
> Terms](https://docs.cloud.google.com/terms/service-terms#1).
>
> Pre-GA products and features are available "as is" and might have limited support.
>
> For more information, see the
> [launch stage descriptions](https://cloud.google.com/products/#product-launch-stages).

BigQuery works with Active Assist to provide various
recommendations that you can use to optimize your BigQuery
resources.

Recommendations are generated by *recommenders*, which use
machine learning (ML) or heuristics to provide recommendations on how to
optimize your BigQuery resource usage.

You can view and manage recommendations across the different recommenders by
using BigQuery in the Google Cloud console---either in the
BigQuery Active Assist, or by recommendation
notifications in BigQuery Studio. You can also view recommendations
through various `INFORMATION_SCHEMA` views at the project and organization
level.

To view your BigQuery recommendations along with other
recommendations across the Google Cloud console, use the
[Active Assist](https://docs.cloud.google.com/recommender/docs/recommendation-hub/find-recommnedation-hub).

## BigQuery recommenders

BigQuery offers the following recommenders:

- [Partitioning and clustering recommender](https://docs.cloud.google.com/bigquery/docs/view-partition-cluster-recommendations), which analyzes your query behavior to find opportunities for partitioning and clustering to optimize your BigQuery tables.
- [Materialized view recommender](https://docs.cloud.google.com/bigquery/docs/manage-materialized-recommendations), which finds opportunities to use materialized views to optimize your workflows.
- [IAM recommender](https://docs.cloud.google.com/policy-intelligence/docs/role-recommendations-overview), which analyzes permissions on your BigQuery datasets and suggests Identity and Access Management (IAM) role updates for principals that have excess permissions.

## View recommendations

To view your recommendations using the Google Cloud console, do the following:

1. In the Google Cloud console, go to the **BigQuery** page.

   [Go to BigQuery](https://console.cloud.google.com/bigquery)
2. In the navigation menu, click **Recommendations**.

   The **Recommendations** page opens, showing all recommendations that are
   generated for the current project or organization, depending on the
   selected scope.
3. To see more information about a specific recommendation or insight,
   click a recommendation.

### View recommendations with `INFORMATION_SCHEMA`

You can also view your recommendations and insights using `INFORMATION_SCHEMA`
views. For example, you can use the `INFORMATION_SCHEMA.RECOMMENDATIONS` view to
view your top three recommendations based on slots savings, as seen in the
following example:

    SELECT
       recommender,
       target_resources,
       LAX_INT64(additional_details.overview.bytesSavedMonthly) / POW(1024, 3) as est_gb_saved_monthly,
       LAX_INT64(additional_details.overview.slotMsSavedMonthly) / (1000 * 3600) as slot_hours_saved_monthly,
      last_updated_time
    FROM
      `region-us`.INFORMATION_SCHEMA.RECOMMENDATIONS
    WHERE
       primary_impact.category = 'COST'
    AND
       state = 'ACTIVE'
    ORDER by
       slot_hours_saved_monthly DESC
    LIMIT 3;

> [!NOTE]
> **Note:** `INFORMATION_SCHEMA` view names are case sensitive.

The result is similar to the following:

```
+---+---+
|                    recommender                    |   target_resources      | est_gb_saved_monthly | slot_hours_saved_monthly |  last_updated_time
+---+---+
| google.bigquery.materializedview.Recommender      | ["project_resource"]    | 140805.38289248943   |        9613.139166666666 |  2024-07-01 13:00:00
| google.bigquery.table.PartitionClusterRecommender | ["table_resource_1"]    | 4393.7416711859405   |        56.61476777777777 |  2024-07-01 13:00:00
| google.bigquery.table.PartitionClusterRecommender | ["table_resource_2"]    |   3934.07264107652   |       10.499466666666667 |  2024-07-01 13:00:00
+---+---+
```

For more information, see the following resources:

- [`INFORMATION_SCHEMA.RECOMMENDATIONS` view](https://docs.cloud.google.com/bigquery/docs/information-schema-recommendations)
- [`INFORMATION_SCHEMA.RECOMMENDATIONS_BY_ORGANIZATION` view](https://docs.cloud.google.com/bigquery/docs/information-schema-recommendations-by-org)
- [`INFORMATION_SCHEMA.INSIGHTS` view](https://docs.cloud.google.com/bigquery/docs/information-schema-insights)

## What's next

- Learn how to [view partition and cluster recommendations](https://docs.cloud.google.com/bigquery/docs/view-partition-cluster-recommendations).
- Learn how to [apply partition and cluster recommendations](https://docs.cloud.google.com/bigquery/docs/apply-partition-cluster-recommendations).
- Learn how to [manage materialized view recommendations](https://docs.cloud.google.com/bigquery/docs/manage-materialized-recommendations).
- Learn how to [use the IAM recommender](https://docs.cloud.google.com/policy-intelligence/docs/role-recommendations-overview).