Stay organized with collections Save and categorize content based on your preferences.
Preview
This feature is subject to the "Pre-GA Offerings Terms" in the General Service Terms section of the Service Specific Terms. You can process personal data for this feature as outlined in the Cloud Data Processing Addendum, subject to the obligations and restrictions described in the agreement under which you access Google Cloud. Pre-GA features are available "as is" and might have limited support. For more information, see the launch stage descriptions.
This document describes how you can use AI assistance to help you observe and troubleshoot your Cloud SQL resources. You can use the AI-assisted troubleshooting tools of Cloud SQL and Gemini Cloud Assist to improve query performance and monitor system performance.
As an early-stage technology, Gemini for Google Cloud products can generate output that seems plausible but is factually incorrect. We recommend that you validate all output from Gemini for Google Cloud products before you use it. For more information, see Gemini for Google Cloud and responsible AI.
LimitationsThe following limitations apply to AI-assisted troubleshooting in Cloud SQL:
After you set up Gemini Cloud Assist, you might need to wait five minutes to let the service propagate before you can enable AI-assisted troubleshooting in Cloud SQL.
To get the permissions that you need to use AI-assisted troubleshooting, ask your administrator to grant you the Database insights viewer (roles/databaseinsights.viewer
) IAM role on the project that hosts the Cloud SQL instance. For more information about granting roles, see Manage access to projects, folders, and organizations.
This predefined role contains the permissions required to use AI-assisted troubleshooting. To see the exact permissions that are required, expand the Required permissions section:
Required permissionsThe following permissions are required to use AI-assisted troubleshooting:
databaseinsights.performanceIssues.detect
databaseinsights.performanceIssues.investigate
You might also be able to get these permissions with custom roles or other predefined roles.
Enable AI-assisted troubleshootingWhen you enable AI-assisted troubleshooting for your Cloud SQL instance, Cloud SQL can analyze the performance of your databases and detect anomalies in the execution of your queries. When Cloud SQL detects anomalies in query performance or identifies high system load, AI-assisted troubleshooting helps you analyze the situation with evidence and provides recommendations.
To enable AI-assisted troubleshooting for your Cloud SQL instance, do the following:
In the Google Cloud console, go to the Cloud SQL Instances page.
If you enable query insights for Cloud SQL Enterprise Plus edition, then your instance requires a restart. If you enable AI-assisted troubleshooting only, then your instance doesn't require a restart. For more information about enabling query insights for Cloud SQL Enterprise Plus edition, see Use query insights to improve query performance.
To use Gemini Cloud Assist with Cloud SQL, do the following:
In the Google Cloud console, go to the Cloud SQL Instances page.
Use AI assistance to troubleshoot individual slow queries in Cloud SQL in using the Query insights dashboard. For more information, see Troubleshoot slow queries with AI assistance.
You can also use Gemini Cloud Assist to enter prompts to help you improve the performance of your queries. Gemini Cloud Assist answers questions for the selected Cloud SQL instance and database.
Examples of query performance prompts Prompt Type of response What are the top queries by latency in my database?You can use AI assistance to analyze database load in Cloud SQL from the Overview page or the Query insights dashboard. For more information, see Troubleshoot high database load with AI assistance.
You can also use Gemini Cloud Assist to enter prompts to gather information about your system performance. Gemini Cloud Assist answers questions for the selected Cloud SQL instance.
Examples of system performance prompts Prompt Type of response How many error log entries are there for this database instance in the last 7 days? Summary of log entries grouped by their severity type. Gemini scopes the response by the time range filter selected in the instance performance chart. What was the CPU utilization for this database instance around 2 PM today? Metrics results in percentage range for CPU utilization within the time interval. Get index recommendations Note: You don't need to enable AI-assisted troubleshooting to obtain index recommendations.You can obtain index recommendations from Cloud SQL in query insights. For more information about obtaining index recommendations, see Use index advisor.
In addition, using Gemini Cloud Assist, you can get more information about how to use indexes in your databases. Gemini Cloud Assist answers questions for the selected Cloud SQL instance.
Examples of index recommendation prompts Prompt Type of response Show index recommendations for queries run in the last 7 days. Guidance on the types of queries that can benefit from an index. Monitor active queries Note: You don't need to enable AI-assisted troubleshooting to monitor active queries.Use the Query insights dashboard to monitor active queries, and if necessary, terminate long-running processes. For more information, see Monitor active queries.
In addition, using Gemini Cloud Assist, you can enter prompts to find out more information about queries that cause high latency or CPU load. Gemini Cloud Assist answers questions for the selected Cloud SQL instance.
Examples of active query prompts Prompt Type of response What are the top queries currently running in my database? Guidance on how to find the longest running and most resource-intensive queries. What's nextExcept as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-07-02 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-07-02 UTC."],[],[]]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4