[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-09-04。"],[[["\u003cp\u003eThis guide provides instructions on enabling or disabling the columnar engine for an AlloyDB Omni database cluster.\u003c/p\u003e\n"],["\u003cp\u003eYou can configure the size of the column store by setting the \u003ccode\u003egoogle_columnar_engine.memory_size_in_mb\u003c/code\u003e flag, which allocates a specific amount of memory to store columnar data.\u003c/p\u003e\n"],["\u003cp\u003eThe columnar engine's vectorized join feature, which can be enabled with the \u003ccode\u003egoogle_columnar_engine.enable_vectorized_join\u003c/code\u003e flag, enhances join performance by using vectorized processing on qualified queries.\u003c/p\u003e\n"],["\u003cp\u003eIn certain cases, such as when auto-refresh fails to update a relation, you may need to manually refresh the column store using the \u003ccode\u003egoogle_columnar_engine_refresh\u003c/code\u003e SQL query.\u003c/p\u003e\n"],["\u003cp\u003eThere are troubleshooting steps available to resolve issues like insufficient shared memory and columns not populating in the columnar engine, and these errors are related to the configuration of the \u003ccode\u003eshm-size\u003c/code\u003e flag and checking for unsupported data types.\u003c/p\u003e\n"]]],[],null,["# Configure the columnar engine in AlloyDB Omni\n\nSelect a documentation version: 15.5.5keyboard_arrow_down\n\n- [Current (16.8.0)](/alloydb/omni/current/docs/columnar-engine/configure)\n- [16.8.0](/alloydb/omni/16.8.0/docs/columnar-engine/configure)\n- [16.3.0](/alloydb/omni/16.3.0/docs/columnar-engine/configure)\n- [15.12.0](/alloydb/omni/15.12.0/docs/columnar-engine/configure)\n- [15.7.1](/alloydb/omni/15.7.1/docs/columnar-engine/configure)\n- [15.7.0](/alloydb/omni/15.7.0/docs/columnar-engine/configure)\n- [15.5.5](/alloydb/omni/15.5.5/docs/columnar-engine/configure)\n- [15.5.4](/alloydb/omni/15.5.4/docs/columnar-engine/configure)\n\n\u003cbr /\u003e\n\nThis page describes how to enable or disable the columnar engine on an AlloyDB Omni database cluster. It also covers how to configure an appropriate initial size for its column store.\n\n\u003cbr /\u003e\n\nTo use the columnar engine when using AlloyDB for PostgreSQL on Google Cloud,\nsee [Configure the columnar engine](/alloydb/docs/columnar-engine/configure).\n\nFor a conceptual overview of the AlloyDB columnar engine, see\n[About the AlloyDB columnar engine](/alloydb/docs/columnar-engine/about).\n\nEnable the columnar engine\n--------------------------\n\nTo use columnar engine on an instance, set the instance's\n[`google_columnar_engine.enabled`](/alloydb/docs/reference/columnar-engine-flags#enabled)\nflag to `on`.\n\nTo set this flag on an instance, do the following:\n\n1. Run [the `ALTER SYSTEM` PostgreSQL command](https://www.postgresql.org/docs/current/sql-altersystem.html):\n\n ALTER SYSTEM SET google_columnar_engine.enabled = 'on'\n\n2. If you want to adjust the columnar engine's configuration, then follow\n the instructions in the next section before you restart the database server.\n Otherwise, follow the next two steps to restart the database server now.\n\n3. [Stop the database server.](/alloydb/omni/15.5.5/docs/run-connect#stop)\n\n4. [Start the database server.](/alloydb/omni/15.5.5/docs/run-connect#start)\n\nConfigure the size of the column store\n--------------------------------------\n\nWhile the columnar engine is enabled on an instance,\nAlloyDB allocates a portion of the instance's memory to\nstore its columnar data. Dedicating high-speed RAM to your column store\nensures that AlloyDB can access the columnar data as\nrapidly as possible.\n\nYou can also you set the allocation to a fixed and specific size using the\n[`google_columnar_engine.memory_size_in_mb`](/alloydb/docs/reference/columnar-engine-flags#memory-size-in-mb) flag.\n\nTo set this flag on an instance, do the following:\n\n1. Run [the `ALTER SYSTEM` PostgreSQL command](https://www.postgresql.org/docs/current/sql-altersystem.html):\n\n ALTER SYSTEM SET google_columnar_engine.memory_size_in_mb = \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-n\"\u003eCOLUMN_STORE_SIZE\u003c/span\u003e\u003c/var\u003e;\n\n Replace \u003cvar translate=\"no\"\u003eCOLUMN_STORE_SIZE\u003c/var\u003e with the new size of the column\n store, in megabytes.\n2. [Stop the database server.](/alloydb/omni/15.5.5/docs/run-connect#stop)\n\n3. [Start the database server.](/alloydb/omni/15.5.5/docs/run-connect#start)\n\nEnable vectorized join\n----------------------\n\n|\n| **Preview**\n|\n|\n| This product or feature is subject to the \"Pre-GA Offerings Terms\" in the General Service Terms section\n| of the [Service Specific Terms](/terms/service-terms#1).\n|\n| Pre-GA products and features are available \"as is\" and might have limited support.\n|\n| For more information, see the\n| [launch stage descriptions](/products#product-launch-stages).\n\nThe columnar engine has a *vectorized join* feature that can improve\nthe performance of joins by applying vectorized\nprocessing to qualifying queries.\n\nAfter you enable vectorized join, the AlloyDB query\nplanner has the option to apply the vectorized join operator instead of\nthe standard PostgreSQL hash join operator. The planner makes this\ndecision by comparing the cost of executing the query using either\nmethod.\n\nTo enable vectorized join on an instance, set the instance's\n[`google_columnar_engine.enable_vectorized_join`](/alloydb/docs/reference/columnar-engine-flags#enable-vectorized-join)\nflag to `on`.\n\nTo set this flag on an instance, run [the `ALTER SYSTEM` PostgreSQL command](https://www.postgresql.org/docs/current/sql-altersystem.html): \n\n ALTER SYSTEM SET google_columnar_engine.enable_vectorized_join = 'on';\n\nAlloyDB allocates one thread to the vectorized join\nfeature by default. You can increase the number of threads available to\nthis feature by setting the\n[`google_columnar_engine.vectorized_join_threads`](/alloydb/docs/reference/columnar-engine-flags#vectorized-join-threads)\nflag to a larger value.\n\nManually refresh your columnar engine\n-------------------------------------\n\nBy default, the columnar engine is set to automatically refresh the column store\nin the background when enabled. You may need to manually refresh the columnar\nstore in certain situations, such as if auto-refresh doesn't refresh a relation\nwith a high number of invalid blocks.\n\nTo manually refresh the column engine, run the following SQL query: \n\n SELECT google_columnar_engine_refresh('\u003cvar translate=\"no\"\u003eTABLE_NAME\u003c/var\u003e');\n\nReplace \u003cvar translate=\"no\"\u003eTABLE_NAME\u003c/var\u003e with the name of the table or the materialized view you\nwant to manually refresh.\n\nDisable the columnar engine\n---------------------------\n\nTo disable the columbar engine on an instance, set the `google_columnar_engine.enabled`\nflag to `off`.\n\nTo set this flag on an instance, do the following:\n\n1. Run [the `ALTER SYSTEM` PostgreSQL command](https://www.postgresql.org/docs/current/sql-altersystem.html):\n\n ALTER SYSTEM SET google_columnar_engine.enabled = 'off'\n\n2. [Stop the database server.](/alloydb/omni/15.5.5/docs/run-connect#stop)\n\n3. [Start the database server.](/alloydb/omni/15.5.5/docs/run-connect#start)\n\nTroubleshoot the columnar engine\n--------------------------------\n\n### Fix an \"insufficient shared memory\" error\n\nIf you run AlloyDB Omni without enough shared memory\nfor the columnar engine to use, then you might see this error: \n\n Insufficient shared memory for generating the columnar formats.\n\nYou can address this issue by specifying the amount of shared memory that is\navailable to the AlloyDB Omni container. The way that you do this\ndiffers depending upon your host operating system \n\n### Linux\n\nIncrease the size of your host machine's `/dev/shm` partition, using a technique such as editing your `/etc/fstab` file.\n| **Note:** This requires that you installed AlloyDB Omni with your `/dev/shm` directory mounted on the container, as shown in [Customize your AlloyDB Omni installation](/alloydb/omni/15.5.5/docs/install#one-omni).\n\n### macOS\n\n[Install a new AlloyDB Omni container](/alloydb/omni/15.5.5/docs/install#one-omni), specifying\na larger shared-memory value for the `--shm-size` flag.\n| **Caution:** Back up your data before switching to using a new container.\n\n### Fix columns not getting populated\n\nIf columns don't populate in the columnar engine, then one of the following situations\nmight be true:\n\n- The columns you want to add include an unsupported data type.\n\n- The requirements of the columnar engine\n aren't being met.\n\nTo find the cause of this issue, try the following:\n\n- [Confirm](/alloydb/docs/columnar-engine/monitor-tune#relations-view)\n that the tables or materialized views in our query are in the columnar engine.\n\n- Verify the usage of the columnar engine\n using the [`EXPLAIN`](/alloydb/docs/columnar-engine/monitor-tune)\n statement.\n\nWhat's next\n-----------\n\n- See the [full list of columnar engine database\n flags](/alloydb/docs/reference/columnar-engine-flags).\n\n- Learn about\n [auto-columnarization](/alloydb/docs/columnar-engine/manage-content-recommendations)."]]