Optimize and troubleshoot with Gemini assistance Stay organized with collections Save and categorize content based on your preferences.
This document describes how you can use Gemini assistance to help youuse system insights to optimize and troubleshoot your Spanner resources.
Note: Query insights aren't supported by Gemini in Spanner.To improve system performance for Spanner usingGemini Cloud Assist, follow these steps:
In the Google Cloud console, go to theSpanner Instances page.
To open theOverview page of an instance, click the instance name.
To open Gemini, clicksparkGemini.
In the Gemini pane, enter a prompt that describes theinformation you're interested in. The prompt must request information aboutsystem insights—for example:
- "What was the peak database CPU utilization in the last 24 hours?"
- "What is the peak transaction latency for this database Instance around2pm today?"
- "What is the database load trend for this instance in the last week?"
- "What is the peak cpu utilization by priority only for system operationsfor database instance in the last hour?"
- "What is the p99 request latency for this database Instance in the last24 hours?"
The duration for the prompt request must be within the past seven days. Theduration can be specified in the following ways:
- Append a duration to the prompt. For example, to get information aboutthe past day, add "in the last 24 hours" or "in the last day" to theend of the prompt.
- In the Google Cloud console by doing the following:
- In Spanner, clickSystem insights in the left pane.
- Click1 hour,6 hours,1 day,7 days. ClickCustomto specify a custom duration that's within the past seven days.
- Don't specify a duration in the prompt or the Google Cloud console to usethe default duration of the last one hour.
If the specified duration extends further in the past than the last sevendays, then an error is returned.
To send the prompt, click sendSend. Gemini returns a response to your prompt.
What's next
- Write SQL with Gemini assistance.
- Learn about how tooptimize Spanner performance.
- Learn how tomonitor instances with system insights.
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-12-15 UTC.