To open the Overview page of an instance, click the instance name.
To open Gemini, click
sparkGemini.
In the Gemini pane, enter a prompt that describes the
information you're interested in. The prompt must request information about
system 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 around
2pm 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 operations
for database instance in the last hour?"
"What is the p99 request latency for this database Instance in the last
24 hours?"
The duration for the prompt request must be within the past seven days. The
duration can be specified in the following ways:
Append a duration to the prompt. For example, to get information about
the past day, add "in the last 24 hours" or "in the last day" to the
end of the prompt.
In the Google Cloud console by doing the following:
In Spanner, click System insights in the left pane.
Click 1 hour, 6 hours, 1 day, 7 days. Click Custom
to 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 use
the default duration of the last one hour.
If the specified duration extends further in the past than the last seven
days, then an error is returned.
To send the prompt, click send sendSend. Gemini returns a response to your prompt.
[[["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-08-28 UTC."],[],[],null,["# Optimize and troubleshoot with Gemini assistance\n\nThis document describes how you can use Gemini assistance to help you\nuse system insights to optimize and troubleshoot your Spanner resources.\n| **Note:** Query insights aren't supported by Gemini in Spanner.\n\nTo improve system performance for Spanner using\nGemini Cloud Assist, follow these steps:\n\n1. In the Google Cloud console, go to the **Spanner Instances** page.\n\n [Go to Spanner Instances](https://console.cloud.google.com/spanner/instances)\n2. To open the **Overview** page of an instance, click the instance name.\n\n3. To open Gemini, click\n spark **Gemini**.\n\n4. In the Gemini pane, enter a prompt that describes the\n information you're interested in. The prompt must request information about\n system insights---for example:\n\n - \"What was the peak database CPU utilization in the last 24 hours?\"\n - \"What is the peak transaction latency for this database Instance around 2pm today?\"\n - \"What is the database load trend for this instance in the last week?\"\n - \"What is the peak cpu utilization by priority only for system operations for database instance in the last hour?\"\n - \"What is the p99 request latency for this database Instance in the last 24 hours?\"\n\n The duration for the prompt request must be within the past seven days. The\n duration can be specified in the following ways:\n - Append a duration to the prompt. For example, to get information about the past day, add \"in the last 24 hours\" or \"in the last day\" to the end of the prompt.\n - In the Google Cloud console by doing the following:\n 1. In Spanner, click **System insights** in the left pane.\n 2. Click **1 hour** , **6 hours** , **1 day** , **7 days** . Click **Custom** to specify a custom duration that's within the past seven days.\n - Don't specify a duration in the prompt or the Google Cloud console to use the default duration of the last one hour.\n\n If the specified duration extends further in the past than the last seven\n days, then an error is returned.\n5. To send the prompt, click send send\n **Send**. Gemini returns a response to your prompt.\n\nWhat's next\n-----------\n\n- [Write SQL with Gemini assistance](/spanner/docs/write-sql-gemini).\n- Learn about how to [optimize Spanner performance](/spanner/docs/performance).\n- Learn how to [monitor instances with system insights](/spanner/docs/monitoring-console)."]]