This document describes how you can use Gemini in Databases assistance to help you observe and troubleshoot your Cloud SQL resources.
Before you begin
Ensure that Gemini in Databases is set up for your organization.
Improve query performance
To improve query performance for Cloud SQL using Gemini assistance, follow these steps:
-
In the Google Cloud console, go to the Cloud SQL Instances page.
- To open the Overview page of an instance, click the instance name.
- In the navigation pane, select Query insights.
- Click Executed Queries.
- To open the Gemini pane, click sparkGemini.
- In the Gemini pane, enter a prompt that describes the
information that you're interested in—for example:
- "Summarize database query trends by users."
- "Which of my queries have high latency for this database instance?"
- "What is the slowest query for this database in this instance?"
- "What are the wait times for the query ID = <hash id>> in this database?"
- To send the prompt, click Send. Gemini returns a response to your prompt based on information from the last hour.
Improve system performance
To improve system performance for Cloud SQL using Gemini assistance, follow these steps:
-
In the Google Cloud console, go to the Cloud SQL Instances page.
- To open the Overview page of an instance, click the instance name.
- Select the Query insights tab from the SQL navigation panel on the left.
- Click Executed Queries .
- To open Gemini, click sparkGemini.
- In the Gemini pane, enter a prompt that describes the
information you're interested in—for example:
- "How many error log entries are there for this database instance?"
- "What was the CPU utilization for this database instance around 2 PM today?"
- "Were there any restarts in the last 7 days for this database?"
- "When was the last instance update event in the last 24 hours for this database?"
- To send the prompt, click Send. Gemini returns a response to your prompt based on information from the last hour.
Improve index usage
To improve index performance for Cloud SQL using Gemini assistance, follow these steps:
-
In the Google Cloud console, go to the Cloud SQL Instances page.
- To open the Overview page of an instance, click the instance name.
- Select the Query insights tab from the SQL navigation panel on the left.
- Click Executed Queries.
- To open Gemini, click spark Gemini.
- In the Gemini pane, enter a prompt that describes the information you're interested in—for example, "What are the top queries that require indexes in my database instance?"
- To send the prompt, click Send. Gemini returns a response to your prompt based on information from the last hour.
What's next
Learn more about the following: