[[["易于理解","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\u003eAuto-columnarization automatically manages the columnar engine's column store, enhancing the performance of HTAP and OLAP workloads by analyzing query patterns and populating the column store with optimal columns.\u003c/p\u003e\n"],["\u003cp\u003eBy default, new instances have auto-columnarization enabled, with a schedule to run every hour, but you can adjust the frequency or run it immediately.\u003c/p\u003e\n"],["\u003cp\u003eYou can view recommended columns, review the recommendation schedule, and see the estimated size of each recommended column.\u003c/p\u003e\n"],["\u003cp\u003eAuto-columnarization can be reset to remove the previously recommended or added columns, clearing all gathered data.\u003c/p\u003e\n"],["\u003cp\u003eThe columnar engine can recommend the optimal memory size for the column store based on your specific workload and performance gains.\u003c/p\u003e\n"]]],[],null,["# Manage column store content using auto-columnarization\n\nThis page describes how to manage the content of the columnar engine's\ncolumn store using auto-columnarization.\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 gain 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/docs/columnar-engine/manage-content-recommendations#default-schedule)\nor\n[change the default schedule of every hour](/alloydb/docs/columnar-engine/manage-content-recommendations#auto-schedule)\nto a desired 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/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/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\nFor more information about\nsetting database flags, see [Configure an instance's database\nflags](/alloydb/docs/instance-configure-database-flags).\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 of recommended columns: \n\n### psql Client\n\n```\nSELECT database_name, schema_name, relation_name, column_name 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 recommend the memory size for the column store: \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/docs/reference/columnar-engine-flags#enable-auto-columnarization)\nflag to `off`.\n\nFor more information about\nsetting database flags, see\n[Configure an instance's database flags](/alloydb/docs/instance-configure-database-flags)."]]