本文档介绍了如何使用 Gemini 协助来帮助您使用系统分析洞见优化 Spanner 资源并排查相关问题。
如需使用 Gemini Cloud Assist 提高 Spanner 的系统性能,请按照以下步骤操作:
在 Google Cloud 控制台中,前往 Spanner 实例页面。
如需打开实例的概览页面,请点击实例名称。
如需打开 Gemini,请点击 spark Gemini。
在 Gemini 窗格中,输入描述您感兴趣的信息的提示。提示必须请求有关系统分析洞见的信息,例如:
- “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?”
提示请求的时长必须在过去 7 天内。可以通过以下方式指定时长:
- 在提示中附加时长。例如,如需获取有关过去一天的信息,请在提示末尾添加“in the last 24 hours”或“in the last day”。
- 在 Google Cloud 控制台中,执行以下操作:
- 在 Spanner 中,点击左侧窗格中的系统分析洞见。
- 点击 1 小时、6 小时、1 天、7 天。点击自定义可指定过去 7 天内的自定义时长。
- 不在提示或 Google Cloud 控制台中指定时长可使用默认时长(即过去 1 小时)。
如果指定的时长早于过去 7 天,则会返回错误。
如需发送提示,请点击
发送。Gemini 会针对您的提示返回回答。
后续步骤
- 使用 Gemini 协助编写 SQL。
- 了解如何优化 Spanner 性能。
- 了解如何使用系统分析洞见监控实例。