[[["易于理解","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-03。"],[[["\u003cp\u003eThis page outlines how to enable or disable the columnar engine on an AlloyDB for PostgreSQL instance by adjusting the \u003ccode\u003egoogle_columnar_engine.enabled\u003c/code\u003e database flag.\u003c/p\u003e\n"],["\u003cp\u003eThe columnar engine's column store size can be configured, either using the default 30% of the instance's memory, or up to a 50% allocation, or by using a specific memory allocation using the \u003ccode\u003egoogle_columnar_engine.memory_size_in_mb\u003c/code\u003e flag.\u003c/p\u003e\n"],["\u003cp\u003eThe vectorized join feature, which enhances join performance, can be enabled by setting the \u003ccode\u003egoogle_columnar_engine.enable_vectorized_join\u003c/code\u003e flag to \u003ccode\u003eon\u003c/code\u003e, and the number of threads can be increased by setting the \u003ccode\u003egoogle_columnar_engine.vectorized_join_threads\u003c/code\u003e flag.\u003c/p\u003e\n"],["\u003cp\u003eThe columnar store can be manually refreshed using a SQL query: \u003ccode\u003eSELECT google_columnar_engine_refresh('<var translate="no">TABLE_NAME</var>');\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eTroubleshooting steps for the columnar engine include reviewing audit logs, confirming that tables are in the engine, and verifying columnar engine usage with the \u003ccode\u003eEXPLAIN\u003c/code\u003e statement.\u003c/p\u003e\n"]]],[],null,["# Configure the columnar engine\n\nThis page describes how to enable or disable the columnar engine on\n\nan AlloyDB for PostgreSQL instance. It also covers how to configure an appropriate\ninitial size for its column store, as well as memory and storage cache settings for optimal performance.\n\nTo use the columnar engine when using AlloyDB Omni,\nsee [Enable the columnar engine in AlloyDB Omni](/alloydb/docs/omni/columnar-engine/configure).\n\nEach of these actions involves changing the value of a database flag on\none of your AlloyDB instances. For more information about\nsetting database flags, see [Configure an instance's database\nflags](/alloydb/docs/instance-configure-database-flags).\n\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`.\nAfter you set this flag, the instance automatically restarts.\n\n\u003cbr /\u003e\n\nFor more information about setting database flags in\nAlloyDB, see [Configure an instance's database flags](https://cloud.google.com/alloydb/docs/instance-configure-database-flags).\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\nMemory and storage cache together represent the overall capacity of the columnar engine.\n\n### Configure memory for the columnar engine\n\nIf the column store becomes larger than the allocated portion of your instance's memory, AlloyDB automatically uses the instance's underlying cache layer to store the additional columnar data.\n\n\u003cbr /\u003e\n\nBy default, AlloyDB allocates 30% of\nthe instance's memory to the column store, and automatically\nadjusts the total allocation if you resize the instance. You can modify\nthe instance's memory to a maximum of 50%. To find the recommended\ncolumnar engine memory size for your instance, see\n[Recommend column store memory size](/alloydb/docs/columnar-engine/manage-content-recommendations#recommend-populate).\n\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 have AlloyDB return to the default allocation,\n[remove the flag from the instance](/alloydb/docs/instance-configure-database-flags).\n\nFor more information on setting or deleting flags, see [Configure an\ninstance's database\nflags](/alloydb/docs/instance-configure-database-flags).\n\n\n### Configure storage cache for the columnar engine\n\nThe columnar engine's storage cache is provisioned according to the instance tier.\n\nThe `google_columnar_engine.storage_cache_size` flag lets you adjust the columnar engine storage cache, with the limitations of the minimum and maximum values listed in the following table:\n\nMonitor storage cache data for the columnar engine\n--------------------------------------------------\n\nTo view information about the columnar engine's storage cache, you can run one of the following SQL queries.\n\nTo check the overall configured size of the storage cache for the columnar engine, run the following command: \n\n SHOW google_columnar_engine.storage_cache_size;\n\nEnable vectorized join\n----------------------\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`.\nFor more information about setting database flags, see [Configure an\ninstance's database\nflags](/alloydb/docs/instance-configure-database-flags).\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`.\nFor more information about setting database flags in AlloyDB, see [Configure an instance's database flags](https://cloud.google.com/alloydb/docs/instance-configure-database-flags).\n\n\u003cbr /\u003e\n\nAfter you set this flag, the instance automatically restarts.\n\n\nTroubleshoot the columnar engine\n--------------------------------\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- Review your instance's\n [audit logs](/alloydb/docs/audit-logging#viewing_logs).\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)."]]