[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-17。"],[[["\u003cp\u003eThe \u003ccode\u003eINFORMATION_SCHEMA.RECOMMENDATIONS\u003c/code\u003e view provides data on all BigQuery recommendations within a project, sourced from the Recommendation Hub, which includes partition and cluster, materialized view, and role recommendations.\u003c/p\u003e\n"],["\u003cp\u003eThis feature is currently in a Pre-GA stage, meaning it's available "as is" with potentially limited support and is subject to the Pre-GA Offerings Terms.\u003c/p\u003e\n"],["\u003cp\u003eTo access recommendations via the \u003ccode\u003eINFORMATION_SCHEMA.RECOMMENDATIONS\u003c/code\u003e view, users need the specific permissions associated with each recommender type, and the view will only display recommendations the user has permission to see.\u003c/p\u003e\n"],["\u003cp\u003eThe view schema includes details such as \u003ccode\u003erecommendation_id\u003c/code\u003e, \u003ccode\u003erecommender\u003c/code\u003e, \u003ccode\u003edescription\u003c/code\u003e, \u003ccode\u003etarget_resources\u003c/code\u003e, \u003ccode\u003estate\u003c/code\u003e, \u003ccode\u003eprimary_impact\u003c/code\u003e, and \u003ccode\u003eadditional_details\u003c/code\u003e, offering a comprehensive overview of each recommendation.\u003c/p\u003e\n"],["\u003cp\u003eQueries against the view must include a region qualifier and can optionally include a project ID, and the query execution location must match the region of the \u003ccode\u003eINFORMATION_SCHEMA\u003c/code\u003e view.\u003c/p\u003e\n"]]],[],null,["# INFORMATION_SCHEMA.RECOMMENDATIONS view\n=======================================\n\n|\n| **Preview**\n|\n|\n| This product or feature is subject to the \"Pre-GA Offerings Terms\" in the General Service Terms section\n| of the [Service Specific Terms](/terms/service-terms#1).\n|\n| Pre-GA products and features are available \"as is\" and might have limited support.\n|\n| For more information, see the\n| [launch stage descriptions](/products#product-launch-stages).\n\nTo request feedback or support for this feature, send email to\n[bq-recommendations+feedback@google.com](mailto:bq-recommendations+feedback@google.com).\n\nThe `INFORMATION_SCHEMA.RECOMMENDATIONS` view contains data about all BigQuery\nrecommendations in the current project. BigQuery retrieves\nrecommendations for all BigQuery recommenders from the Recommendation Hub\nand present it in this view.\n\nThe `INFORMATION_SCHEMA.RECOMMENDATIONS` view supports the following\nrecommendations:\n\n- [Partition \\& cluster recommendations](/bigquery/docs/view-partition-cluster-recommendations)\n- [Materialized view recommendations](/bigquery/docs/manage-materialized-recommendations)\n- [Role recommendations for BigQuery datasets](/policy-intelligence/docs/review-apply-role-recommendations-datasets)\n\nThe `INFORMATION_SCHEMA.RECOMMENDATIONS` view shows only BigQuery-related recommendations.\nYou can view Google Cloud recommendations in the Recommendation Hub.\n\nRequired permission\n-------------------\n\nTo view recommendations with the `INFORMATION_SCHEMA.RECOMMENDATIONS` view, you\nmust have the required permissions for the corresponding recommender. The\n`INFORMATION_SCHEMA.RECOMMENDATIONS` view only returns recommendations that you\nhave permission to view.\n\nAsk your administrator to grant access to view the recommendations. To see the\nrequired permissions for each recommender, see the following:\n\n- [Partition \\& cluster recommender permissions](/bigquery/docs/view-partition-cluster-recommendations#required_permissions)\n- [Materialized view recommendations permissions](/bigquery/docs/manage-materialized-recommendations#required_permissions)\n- [Role recommendations for datasets permissions](/policy-intelligence/docs/review-apply-role-recommendations-datasets#required-permissions)\n\nSchema\n------\n\nThe `INFORMATION_SCHEMA.RECOMMENDATIONS` view has the following schema:\n\nScope and syntax\n----------------\n\nQueries against this view must include a\n[region qualifier](/bigquery/docs/information-schema-intro#syntax). A project ID\nis optional. If no project ID is specified, the project that the query runs\nin is used.\n\nReplace the following:\n\n- Optional: \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: the ID of your Google Cloud project. If not specified, the default project is used.\n- \u003cvar translate=\"no\"\u003eREGION\u003c/var\u003e: any [dataset region name](/bigquery/docs/locations). For example, ```region-us```.\n\n \u003cbr /\u003e\n\n \u003cbr /\u003e\n\n | **Note:** You must use [a region qualifier](/bigquery/docs/information-schema-intro#region_qualifier) to query `INFORMATION_SCHEMA` views. The location of the query execution must match the region of the `INFORMATION_SCHEMA` view.\n\n\u003cbr /\u003e\n\nExample\n-------\n\nTo run the query against a project other than your default project, add the\nproject ID in the following format: \n\n```bash\n`PROJECT_ID`.`region-REGION_NAME`.INFORMATION_SCHEMA.RECOMMENDATIONS\n```\nReplace the following:\n\n\u003cbr /\u003e\n\n- \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: the ID of the project.\n- \u003cvar translate=\"no\"\u003eREGION_NAME\u003c/var\u003e: the region for your project.\n\nFor example, ```myproject`.`region-us`.INFORMATION_SCHEMA.RECOMMENDATIONS``.\n\n### View top cost saving recommendations\n\nThe following example returns top 3 `COST` category recommendations on the basis\nof the projected `slot_hours_saved_monthly`: \n\n SELECT \n recommender,\n target_resources,\n LAX_INT64(additional_details.overview.bytesSavedMonthly) / POW(1024, 3) as est_gb_saved_monthly,\n LAX_INT64(additional_details.overview.slotMsSavedMonthly) / (1000 * 3600) as slot_hours_saved_monthly,\n last_updated_time\n FROM \n `region-us`.\n INFORMATION_SCHEMA.RECOMMENDATIONS_BY_PROJECT\n WHERE \n primary_impact.category = 'COST'\n AND\n state = 'ACTIVE'\n ORDER by \n slot_hours_saved_monthly DESC \n LIMIT 3;\n\n| **Note:** `INFORMATION_SCHEMA` view names are case sensitive.\n\nThe result is similar to the following: \n\n```\n+---------------------------------------------------+--------------------------------------------------------------------------------------------------+\n| recommender | target_resources | est_gb_saved_monthly | slot_hours_saved_monthly | last_updated_time\n+---------------------------------------------------+--------------------------------------------------------------------------------------------------+\n| google.bigquery.materializedview.Recommender | [\"project_resource\"] | 140805.38289248943 | 9613.139166666666 | 2024-07-01 13:00:00\n| google.bigquery.table.PartitionClusterRecommender | [\"table_resource_1\"] | 4393.7416711859405 | 56.61476777777777 | 2024-07-01 13:00:00\n| google.bigquery.table.PartitionClusterRecommender | [\"table_resource_2\"] | 3934.07264107652 | 10.499466666666667 | 2024-07-01 13:00:00\n+---------------------------------------------------+--------------------------------------------------------------------------------------------------+\n```"]]