[[["易于理解","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-05。"],[[["\u003cp\u003eAuto-columnarization automatically manages the content of the column store, enhancing performance for HTAP and OLAP workloads by analyzing queries and identifying optimal columns.\u003c/p\u003e\n"],["\u003cp\u003eBy default, new instances have auto-columnarization enabled, which runs every hour to recommend and populate columns, but this schedule can be changed to a different time interval.\u003c/p\u003e\n"],["\u003cp\u003eYou can immediately run auto-columnarization using the \u003ccode\u003eSELECT google_columnar_engine_recommend();\u003c/code\u003e command in the psql client, regardless of the default schedule.\u003c/p\u003e\n"],["\u003cp\u003eThe columnar engine allows users to view information about recommended columns, including their size and the current recommendation schedule, using SQL commands.\u003c/p\u003e\n"],["\u003cp\u003eUsers can reset auto-columnarization and remove the columns automatically added to the column store, and disable auto-columnarization entirely if needed.\u003c/p\u003e\n"]]],[],null,["# Manage column store content using auto-columnarization\n\nSelect a documentation version: 16.3.0keyboard_arrow_down\n\n- [Current (16.8.0)](/alloydb/omni/current/docs/columnar-engine/manage-content-recommendations)\n- [16.8.0](/alloydb/omni/16.8.0/docs/columnar-engine/manage-content-recommendations)\n- [16.3.0](/alloydb/omni/16.3.0/docs/columnar-engine/manage-content-recommendations)\n- [15.12.0](/alloydb/omni/15.12.0/docs/columnar-engine/manage-content-recommendations)\n- [15.7.1](/alloydb/omni/15.7.1/docs/columnar-engine/manage-content-recommendations)\n- [15.7.0](/alloydb/omni/15.7.0/docs/columnar-engine/manage-content-recommendations)\n\n\u003cbr /\u003e\n\nThis page describes how to manage the content of the columnar engine's column store using auto-columnarization.\n\n\u003cbr /\u003e\n\nBy using auto-columnarization, the columnar engine automatically columnarizes\nthe data in the column store and improves the overall performance of your\nhybrid transactional and analytical processing (HTAP) and online analytical\nprocessing (OLAP) workloads.\n\nThe columnar engine samples an application workload and analyzes queries to\ndetermine which columns are good hypothetical candidates for inclusion in the\ncolumn store. It also populates columns automatically to the column store that\nprovides the best performance gains after considering the current column store\nmemory size.\n\nNew instances have auto-columnarization enabled by default, configured\nto recommend and populate columns to the column store once every hour. You can\neither\n[run auto-columnarization immediately](/alloydb/omni/16.3.0/docs/columnar-engine/manage-content-recommendations#default-schedule)\nor\n[change the default schedule of every hour](/alloydb/omni/16.3.0/docs/columnar-engine/manage-content-recommendations#auto-schedule)\nto a chosen time interval to run auto-columnarization.\n\nWhen an instance restarts, the columnar engine clears the previously recommended\nand populated columns, and restarts auto-columnarization.\n\nAfter auto-columnarization recommends columns, you can review the results of the\nrecommendations by\n[viewing recommended columns](/alloydb/omni/16.3.0/docs/columnar-engine/manage-content-recommendations#view-recommended-columns).\n\nRun auto-columnarization immediately\n------------------------------------\n\nYou can run auto-columnariation immediately before the default schedule takes\neffect.\n\nTo run auto-columnarization immediately: \n\n### psql Client\n\n```\nSELECT google_columnar_engine_recommend();\n```\n\nChange the default schedule for auto-columnarization\n----------------------------------------------------\n\nTo change an instance's default schedule to run auto-columnarization,\nset that instance's\n[`google_columnar_engine.auto_columnarization_schedule`](/alloydb/omni/16.3.0/docs/reference/columnar-engine-flags#auto-columnarization-schedule)\nflag to a new time interval.\n\nThe flag takes the value `EVERY `\u003cvar translate=\"no\"\u003eNUMBER\u003c/var\u003e` {HOURS|DAYS}`.\nFor example: `EVERY 12 HOURS`, or `EVERY 2 DAYS`.\n\nView information about recommended columns\n------------------------------------------\n\nYou can view information about the size of recommended columns, list of\nrecommended columns, and recommendation schedule.\n\nTo view the list and the size of recommended columns, follow these steps: \n\n### psql Client\n\n```\nSELECT database_name, schema_name, relation_name, column_name, estimated_size_in_bytes FROM g_columnar_recommended_columns;\n```\n\nTo view the column recommendation schedule: \n\n### psql Client\n\n```\nSELECT * FROM g_columnar_schedules;\n```\n\nReset auto-columnarization and remove recommended columns\n---------------------------------------------------------\n\nYou can reset auto-columnarization, including all data it has gathered to\ngenerate recommendations.\n\nThis removes columns that were automatically added to the column store by\nauto-columnarization.\n\nTo reset auto-columnarization: \n\n### psql Client\n\n```\nSELECT google_columnar_engine_reset_recommendation(drop_columns =\u003e true);\n```\n\nRecommend column store memory size\n----------------------------------\n\nThe columnar engine can recommend the best column store memory size along with the\nlist of columns for your workload that provides the highest performance gains.\n\nYou can update `google_columnar_engine.memory_size_in_mb` based on the\nrecommendations.\n\nTo view the recommended memory size for the column store, follow these instructions: \n\n### psql Client\n\n```\nSELECT * FROM google_columnar_engine_recommend(mode =\u003e 'RECOMMEND_SIZE');\n```\n\nDisable auto-columnarization\n----------------------------\n\nTo disable auto-columnarization on a primary or read pool instance, set the\ninstance's\n[`google_columnar_engine.enable_auto_columnarization`](/alloydb/omni/16.3.0/docs/reference/columnar-engine-flags#enable-auto-columnarization)\nflag to `off`."]]