Set up Gemini in Databases

To set up Gemini in Databases, you must perform the following setup steps:

  1. Enable Gemini in Databases.

  2. Enable the Recommender API.

  3. Enable Index Advisor (only applicable to Cloud SQL for PostgreSQL and Cloud SQL for MySQL.)

Before you begin

To enable Gemini in Databases, you must have the roles/billing.admin Identity and Access Management (IAM) role.

Enable Gemini in Databases

  1. In the Google Cloud console, go to the Gemini for Google Cloud page.

    Gemini for Google Cloud

  2. Click Gemini in Databases.

    The Explore Gemini pane is displayed.

  3. Click Get Gemini in Databases.

    The Admin for Gemini page is displayed.

  4. Choose the billing for which you want to enable Gemini in Databases and click Continue to Admin for Gemini page.

    The Gemini in Databases page is displayed.

  5. Click Review terms and turn on.

    The Turn on Gemini in Databases page is displayed.

  6. Click Purchase to enable Gemini in Databases.

Enable the Recommender API

Enable the Recommender API.

Enable the API

Enable Index Advisor

Do one of the following:

  • To enable Index Advisor for Cloud SQL for PostgreSQL instances, run the following Google Cloud CLI command:

    gcloud sql instances patch INSTANCE_NAME \
        --database-flags=cloudsql.enable_index_advisor=on
    

    Replace INSTANCE_NAME with your instance's name.

  • To enable Index Advisor for Cloud SQL for MySQL instances, run the following gcloud CLI command:

    gcloud sql instances patch INSTANCE_NAME \
        --database-flags=cloudsql_index_advisor=on,performance_schema=on
    

    Replace INSTANCE_NAME with your instance's name.