Configure columnar engine and size of the column store

Stay organized with collections Save and categorize content based on your preferences.

This page describes how to enable or disable the columnar engine on an AlloyDB for PostgreSQL instance and configure an appropriate initial size for its column store.

Enable the columnar engine

Enable the columnar engine on the primary instance or a read pool instance by setting that instance's google_columnar_engine.enabled flag to on.

To enable columnar engine on the primary instance or a read pool instance:

Console

  1. In the Google Cloud console, go to the Clusters page.

    Go to Clusters

  2. Click a cluster in the Resource Name column.
  3. In the Overview page, go to Instances in your cluster.
  4. Click Edit primary or Edit read pool.
  5. In the Edit primary instance or Edit read pool instance panel, select the google_columnar_engine.enabled flag from the Flags list.
  6. Set the value to on.
  7. Click Done.
  8. Click Update instance or Update read pool.

gcloud

To use the gcloud CLI, you can install and initialize the Google Cloud CLI, or you can use Cloud Shell.

gcloud alloydb instances update INSTANCE_ID \
    --database-flags google_columnar_engine.enabled=on [:FLAG2=VALUE2...] \
    --region=REGION_ID \
    --cluster=CLUSTER_ID \
    --project=PROJECT_ID
  • INSTANCE_ID: The ID of the instance.
  • REGION_ID: The region where the instance is present.
  • CLUSTER_ID: The ID of the cluster where the instance is present.
  • PROJECT_ID: The ID of the project where the cluster is present.

Configure the size of the column store

By default, the columnar engine allocates 30% of the instance's memory to its column store.

To meet the actual instance workload requirements based on the instance memory size, you can change the default size by setting the flag, google_columnar_engine.memory_size_in_mb.

Console

  1. In the Google Cloud console, go to the Clusters page.

    Go to Clusters

  2. Click a cluster in the Resource Name column.
  3. In the Overview page, go to Instances in your cluster.
  4. Click Edit primary or Edit read pool.
  5. In the Edit primary instance or Edit read pool instance panel, select the google_columnar_engine.memory_size_in_mb flag from the Flags list.
  6. Enter an integer between 128 and 2147483647 in the Value field.
  7. Click Done.
  8. Click Update instance or Update read pool.

gcloud

To use the gcloud CLI, you can install and initialize the Google Cloud CLI, or you can use Cloud Shell.

Configure the instance memory allocated to the column store:

gcloud alloydb instances update INSTANCE_ID \
    --database-flags google_columnar_engine.enabled=on, google_columnar_engine.memory_size_in_mb=SIZE[,flag2=value2...] \
    --region=REGION_ID \
    --cluster=CLUSTER_ID \
    --project=PROJECT_ID
  • INSTANCE_ID: The ID of the instance.
  • SIZE: An integer value that defines the size of the column store in MB.
  • REGION_ID: The region where the instance is present.
  • CLUSTER_ID: The ID of the cluster where the instance is present.
  • PROJECT_ID: The ID of the project where the cluster is present.

Disable the columnar engine

To disable the columnar engine on the primary instance or a read pool instance, set that instance's google_columnar_engine.enabled flag to off.

Console

  1. In the Google Cloud console, go to the Clusters page.

    Go to Clusters

  2. Click a cluster in the Resource Name column.
  3. In the Overview page, go to Instances in your cluster.
  4. Click Edit primary or Edit read pool.
  5. In the Edit primary instance or Edit read pool instance panel, select the google_columnar_engine.enabled flag from the Flags list.
  6. Set the value to off.
  7. Click Done.
  8. Click Update instance or Update read pool.

gcloud

To use the gcloud CLI, you can install and initialize the Google Cloud CLI, or you can use Cloud Shell.

gcloud alloydb instances update INSTANCE_ID \
    --database-flags google_columnar_engine.enabled=off \
    --region=REGION_ID \
    --cluster=CLUSTER_ID \
    --project=PROJECT_ID
  • INSTANCE_ID: The ID of the instance.
  • REGION_ID: The region where the instance is present.
  • CLUSTER_ID: The ID of the cluster where the instance is present.
  • PROJECT_ID: The ID of the project where the cluster is present.

What's next