Monitor and troubleshoot with Gemini assistance

This document describes how you can use Gemini in Databases assistance to help you monitor and troubleshoot your AlloyDB for PostgreSQL resources.

Before you begin

Ensure that Gemini in Databases is set up for your organization.

Improve query performance

To improve query performance for AlloyDB using Gemini assistance, follow these steps:

  1. In the Google Cloud console, go to the Clusters page.
  2. Go to Clusters
  3. From the list of clusters and instances, click an instance.
  4. Click Query Insights.
  5. Click Executed Queries.
  6. To open the Gemini pane, click sparkGemini.
  7. 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?"
  8. 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 AlloyDB using Gemini assistance, follow these steps:

  1. In the Google Cloud console, go to the Clusters page.
  2. Go to Clusters
  3. From the list of clusters and instances, click an instance.
  4. Click Query Insights.
  5. To open Gemini, click sparkGemini.
  6. 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?"
  7. 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 AlloyDB using Gemini assistance, follow these steps:

  1. In the Google Cloud console, go to the Clusters page.
  2. Go to Clusters
  3. From the list of clusters and instances, click an instance.
  4. Click Query Insights.
  5. Click Executed Queries.
  6. To open Gemini, click spark Gemini.
  7. 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?"
  8. To send the prompt, click Send. Gemini returns a response to your prompt based on information from the last hour.

Monitor active queries

To improve the performance of active queries for AlloyDB using Gemini assistance, follow these steps:

  1. In the Google Cloud console, go to the Clusters page.
  2. Go to Clusters
  3. From the list of clusters and instances, click an instance.
  4. Click Query Insights.
  5. Click Active Queries.
  6. To open Gemini, click spark Gemini.
  7. In the Gemini pane, enter a prompt that describes the information you're interested in—for example:
    • "What are the top queries running for this database instance?"
    • "Are there any active queries with transaction duration > 1 min for this database instance"
  8. 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: