Observe and troubleshoot with Gemini assistance

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:

  1. In the Google Cloud console, go to the Cloud SQL Instances page.

    Go to Cloud SQL Instances

  2. To open the Overview page of an instance, click the instance name.
  3. In the navigation pane, select Query insights.
  4. Click Executed Queries.
  5. To open the Gemini pane, click sparkGemini.
  6. 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?"
  7. 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:

  1. In the Google Cloud console, go to the Cloud SQL Instances page.

    Go to Cloud SQL Instances

  2. To open the Overview page of an instance, click the instance name.
  3. Select the Query insights tab from the SQL navigation panel on the left.
  4. Click Executed Queries
  5. .
  6. To open Gemini, click sparkGemini.
  7. 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?"
  8. 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:

  1. In the Google Cloud console, go to the Cloud SQL Instances page.

    Go to Cloud SQL Instances

  2. To open the Overview page of an instance, click the instance name.
  3. Select the Query insights tab from the SQL navigation panel on the left.
  4. Click Executed Queries.
  5. To open Gemini, click spark Gemini.
  6. 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?"
  7. 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: