Gemini in Databases overview

Gemini in Databases, which is a product in the Gemini for Google Cloud portfolio, is an AI-powered database assistant that helps you optimize your database fleet and work with the data in your databases. Gemini in Databases helps simplify all aspects of database operations, including programming, performance optimization, fleet management, governance, and migrations.

AI assistance with Gemini in Databases

Gemini in Databases provides AI assistance to help you in the following ways:

  • Reduce risk and optimize your database fleet with Database Center. Database Center lets you aggregate and summarize your fleet's top-level health issues based on data from your Google Cloud projects and Security Command Center. Database Center then advises you on how to investigate affected projects or instances. The Database Center dashboard displays a percentage that represents how many of your resources are passing a given health issue test. Available in AlloyDB for PostgreSQL and Cloud SQL.

  • Provide code assistance in Database studio. Gemini in Databases lets you use natural language questions to manage your data and create SQL queries. You can perform a range of actions that you would perform on a SQL command-line client, such as creating tables and indexes, modifying tables, or setting up views. Available in AlloyDB for PostgreSQL, Cloud SQL, and Spanner.

  • Stay ahead of potential performance issues with Enhanced Query Insights. Gemini in Databases includes Enhanced Query Insights to detect, troubleshoot, and help prevent database and query performance problems using real-time diagnostics. You can correlate metrics across multiple dimensions to identify hard-to-diagnose issues. Gemini in Databases provides in-context explainability for nuanced database concepts such as wait events, database flags, and various database metrics available for troubleshooting. Available in AlloyDB for PostgreSQL.

  • Improve security posture. Gemini in Databases helps you improve the security posture of your databases by proactively detecting configuration issues and providing security recommendations. Available in AlloyDB for PostgreSQL and Cloud SQL.

  • Utilize assisted code and schema conversion in Database Migration Service. Gemini in Databases helps you improve code conversion in a workspace and expedite your conversion effort. Gemini in Databases simplifies converting database application code like stored procedures, triggers, and functions to a PostgreSQL-compatible dialect in order to modernize your legacy databases into a cloud-optimized database such as Cloud SQL for PostgreSQL or AlloyDB for PostgreSQL.

Learn how and when Gemini for Google Cloud uses your data. As an early-stage technology, Gemini for Google Cloud products can generate output that seems plausible but is factually incorrect. We recommend that you validate all output from Gemini for Google Cloud products before you use it. For more information, see Gemini for Google Cloud and responsible AI.

Features

The following table shows Gemini in Databases features, along with links to documentation:

Task Type of assistance Product documentation
Manage your database fleet
  • Provide contextual chat to interact with findings.
  • Analyze usage patterns.
  • Stay ahead of database issues.
  • Provide recommendations to improve database configurations.
Generate SQL queries
  • Write in natural language to generate SQL statements.
  • Get contextual code that works with your schema.
  • Optimize and explain existing queries.
Fine-tune database performance
  • Detect and troubleshoot your query performance issues.
  • Analyze query metrics across multiple dimensions.
  • Provide tailored, proactive recommendations to lower cost, improve performance, and help secure your applications.
Modernize your database
  • Filter the source schema by issue group, which is contextualized by your new saved SQL statements.
  • Review suggestions for code corrections.

Where to interact with Gemini in Databases

After you set up Gemini in Databases for a project, you can ask for assistance in a few places within the Google Cloud console:

  • The Gemini pane
  • Database Center
  • Gemini assistance in Studio
  • The Query Insights dashboard
  • The Conversion workspaces page in the Database Migration Service
  • AlloyDB for PostgreSQL and Cloud SQL pages

Conversational assistance in Gemini in Databases

You can use Gemini in Databases conversational assistance to get AI-assisted answers to your questions about the following topics:

  • Query and system performance
  • Database fleet health

Conversational assistance for query and system performance

The following products offer conversational assistance for query and system performance issues in the Google Cloud console:

  • AlloyDB for PostgreSQL
  • Cloud SQL for MySQL
  • Cloud SQL for PostgreSQL

You can use conversational assistance to ask questions about the following common types of query and system performance issues:

  • Query metrics
  • System metrics
  • Index advisor
  • Active queries
  • Enhanced query insights
  • Event timelines

To use conversational assistance, go to one of the following pages in the Google Cloud console for a supported product, and find the Gemini pane:

  • Overview page
  • System Insights page
  • Query Insights page
  • Query Details page

The following table provides example prompts for event timelines, query metrics, and system metrics:

Category Example prompts
Event timelines
  • "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?"
Query metrics
  • "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 = in this database?"
System metrics
  • "How many error log entries are there for this database instance?"
  • "What is the statement count for this database instance?"
  • "What was the CPU utilization for this database instance around 2 PM today?"

By default, the Gemini conversational assistance responds with information from the previous hour. You can specify different time ranges, such as the previous 24 hours or 7 days. Responses are limited to the last 7 days.

Responses that are related to event timelines are limited to the most recent 200 events. For AlloyDB for PostgreSQL, event timeline questions are limited to the us-central-1 region.

Conversational assistance for Database Center

You can use conversational assistance in Gemini to get help with your instances and databases in Database Center. For example, you can prompt Gemini with questions about the health of your database fleet, and Gemini recommends ways to optimize the databases in your fleet.

For more information, see Use Gemini to learn about fleet health issues.

Database Center

Database Center is a dashboard of health issues for the instances and databases in your Google Cloud project. It displays a percentage that represents how many of your resources are passing a given health issue test.

For more information, see Database Center overview.

AlloyDB for PostgreSQL and Cloud SQL pages

You can see the list of security, data protection, and performance recommendations that appear in the Google Cloud console for AlloyDB for PostgreSQL and Cloud SQL.

For more information, see Database security recommendations and Data protection and performance recommendations.

Code suggestions

Database Migration Service integrates Gemini for Google Cloud into conversion workspaces to help you speed up and improve the conversion process in two areas:

  • Provide code explainability features with the conversion assistant: a set of dedicated prompts that can help you better understand the conversion logic, propose fixes for conversion issues, or optimize converted code.

  • Expedite applying fixes for conversion issues with Gemini code conversion suggestions: a mechanism where the Gemini model can learn as you fix conversion issues and suggest changes to other faulty objects in the workspace.

For more information, see one of the following:

Set up Gemini in Databases

For detailed setup steps, see Set up Gemini in Databases.

What's next