Files
doc-exports/docs/dws/dev/dws_04_0920.html
luhuayi 177cd61a57 DWS DEVG 910.211 version
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com>
Co-authored-by: luhuayi <luhuayi@huawei.com>
Co-committed-by: luhuayi <luhuayi@huawei.com>
2025-05-05 07:44:03 +00:00

102 lines
26 KiB
HTML

<a name="EN-US_TOPIC_0000001764650352"></a><a name="EN-US_TOPIC_0000001764650352"></a>
<h1 class="topictitle1">Query and Index Statistics Collector</h1>
<div id="body8662426"><p id="EN-US_TOPIC_0000001764650352__a268561ade5984c0283c22ce44f705bb3">The query and index statistics collector is used to collect statistics during database running. The statistics include the times of inserting and updating a table and an index, the number of disk blocks and tuples, and the time required for the last cleanup and analysis on each table. The statistics can be viewed by querying system view families pg_stats and pg_statistic. The following parameters are used to set the statistics collection feature in the server scope.</p>
<div class="section" id="EN-US_TOPIC_0000001764650352__s6b0083cc3bcb40879807c215decb9389"><h4 class="sectiontitle">track_activities</h4><p id="EN-US_TOPIC_0000001764650352__afc7bc348f37c49dca0783e4039868b41"><strong id="EN-US_TOPIC_0000001764650352__en-us_topic_0059779313_en-us_topic_0058967616_b20190898">Parameter description</strong>: Collects statistics about the commands that are being executed in session.</p>
<p id="EN-US_TOPIC_0000001764650352__a10f26ff57c00455b82f72ff6efb35659"><strong id="EN-US_TOPIC_0000001764650352__b62701982181">Type</strong>: SUSET</p>
<p id="EN-US_TOPIC_0000001764650352__a583707d5ab254356bf3c14df911303dd"><strong id="EN-US_TOPIC_0000001764650352__en-us_topic_0059779313_en-us_topic_0058967616_b25312147">Value range</strong>: Boolean</p>
<ul id="EN-US_TOPIC_0000001764650352__ua9d86060549f4285b9934041d41e721b"><li id="EN-US_TOPIC_0000001764650352__l96d88df594954e2db405610cfee8eff3"><strong id="EN-US_TOPIC_0000001764650352__b195366746634730">on</strong> indicates that the statistics collection function is enabled.</li><li id="EN-US_TOPIC_0000001764650352__l93111d9afd42412bb1dd8a855e7d3fd6"><strong id="EN-US_TOPIC_0000001764650352__b30774405134730">off</strong> indicates that the statistics collection function is disabled.</li></ul>
<p id="EN-US_TOPIC_0000001764650352__ae5fd84f154b34dcebc888bc171597457"><strong id="EN-US_TOPIC_0000001764650352__b842352706171026">Default value</strong>: <strong id="EN-US_TOPIC_0000001764650352__b842352706171029">on</strong></p>
</div>
<div class="section" id="EN-US_TOPIC_0000001764650352__s4682d08468f84845bfdc6ae9477126e8"><h4 class="sectiontitle">track_counts</h4><p id="EN-US_TOPIC_0000001764650352__ac5acba713a4f4aceb58c70135737321e"><strong id="EN-US_TOPIC_0000001764650352__en-us_topic_0059779313_ab754efb333a940448f416f9896ab02fc">Parameter description</strong>: Collects statistics about data activities.</p>
<p id="EN-US_TOPIC_0000001764650352__p44114392542"><strong id="EN-US_TOPIC_0000001764650352__b1430151131820">Type</strong>: SUSET</p>
<p id="EN-US_TOPIC_0000001764650352__a8579e1dd57bf44189f48cca0390a49cc"><strong id="EN-US_TOPIC_0000001764650352__b825752892">Value range</strong>: Boolean</p>
<ul id="EN-US_TOPIC_0000001764650352__u905ec35ac6bb429baa77d426d115329a"><li id="EN-US_TOPIC_0000001764650352__l9568273b2eb345f8b0e3b6d4060ae265"><strong id="EN-US_TOPIC_0000001764650352__b86685220434730">on</strong> indicates that the statistics collection function is enabled.</li><li id="EN-US_TOPIC_0000001764650352__l24bd614f6a39426d95ddc2afe1b112d5"><strong id="EN-US_TOPIC_0000001764650352__b134521767334730">off</strong> indicates that the statistics collection function is disabled.</li></ul>
<div class="note" id="EN-US_TOPIC_0000001764650352__ncc6586d09c57407199105c318161e600"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="EN-US_TOPIC_0000001764650352__a824848b59eb443a2ab6087c0b936e4d5">When the database to be cleaned up is selected from the AutoVacuum automatic cleanup process, the database statistics are required. In this case, the default value is set to <strong id="EN-US_TOPIC_0000001764650352__b442995215234">on</strong>.</p>
</div></div>
<p id="EN-US_TOPIC_0000001764650352__aa144fd15ed3f4054ac265066d87a9776"><strong id="EN-US_TOPIC_0000001764650352__b19573715114114">Default value</strong>: <strong id="EN-US_TOPIC_0000001764650352__b842352706172116">on</strong></p>
</div>
<div class="section" id="EN-US_TOPIC_0000001764650352__s7ac4a5a51fff49d4984bcaa9133fa47e"><h4 class="sectiontitle">track_io_timing</h4><p id="EN-US_TOPIC_0000001764650352__ad30d5296f13d4cfbba811c8f93fc7b27"><strong id="EN-US_TOPIC_0000001764650352__en-us_topic_0059779313_en-us_topic_0058967616_b65006536">Parameter description</strong>: Collects statistics about I/O invoking timing in the database. The I/O timing statistics can be queried by using the <strong id="EN-US_TOPIC_0000001764650352__b137617752834730">pg_stat_database</strong> parameter.</p>
<p id="EN-US_TOPIC_0000001764650352__a7c62999d1bbc421bbe7d1304d0d3c546"><strong id="EN-US_TOPIC_0000001764650352__b12392161621816">Type</strong>: SUSET</p>
<p id="EN-US_TOPIC_0000001764650352__a04f5ebe55bf84ba2ade9a1ae0a34cbc2"><strong id="EN-US_TOPIC_0000001764650352__en-us_topic_0059779313_en-us_topic_0058967616_b18806975">Value range</strong>: Boolean</p>
<ul id="EN-US_TOPIC_0000001764650352__ucecc3d59bf924ec494e1550f8c69ff2c"><li id="EN-US_TOPIC_0000001764650352__l865470681df1462098f37a9f9482a31a">If this parameter is set to <strong id="EN-US_TOPIC_0000001764650352__b8793755172316">on</strong>, the collection function is enabled. In this case, the collector repeatedly queries the OS at the current time. As a result, large numbers of costs may occur on some platforms. Therefore, the default value is set to <strong id="EN-US_TOPIC_0000001764650352__b1179418555233">off</strong>.</li><li id="EN-US_TOPIC_0000001764650352__l499426b0651640f3bdc62e3b80f450ef"><strong id="EN-US_TOPIC_0000001764650352__b149413381134730">off</strong> indicates that the statistics collection function is disabled.</li></ul>
<p id="EN-US_TOPIC_0000001764650352__af063406b51a44e118f8d719aa0684ada"><strong id="EN-US_TOPIC_0000001764650352__b55233292105553">Default value</strong>: <strong id="EN-US_TOPIC_0000001764650352__b842352706172155">off</strong></p>
</div>
<div class="section" id="EN-US_TOPIC_0000001764650352__s1677358074964556a69b04fe72b6f870"><h4 class="sectiontitle">track_functions</h4><p id="EN-US_TOPIC_0000001764650352__a3136546134e5489cbffead378c877b44"><strong id="EN-US_TOPIC_0000001764650352__en-us_topic_0059779313_en-us_topic_0058967616_b488426">Parameter description</strong>: Collects statistics about invoking times and duration in a function.</p>
<p id="EN-US_TOPIC_0000001764650352__a7c0d3f1bfe224a759215c60000765050"><strong id="EN-US_TOPIC_0000001764650352__b13268141771813">Type</strong>: SUSET</p>
<div class="notice" id="EN-US_TOPIC_0000001764650352__n5f8b16dc70164e7284827539b4ccde38"><span class="noticetitle"><img src="public_sys-resources/notice_3.0-en-us.png"> </span><div class="noticebody"><p id="EN-US_TOPIC_0000001764650352__ada614209e0a94cce90fb4a244c632e9b">When the SQL functions are set to inline functions queried by the invoking, these SQL functions cannot be traced no matter these functions are set or not.</p>
</div></div>
<p id="EN-US_TOPIC_0000001764650352__a3ffab0ba9a3d49b0bb9ef2443e233a69"><strong id="EN-US_TOPIC_0000001764650352__en-us_topic_0059779313_en-us_topic_0058967616_b33749742">Value range</strong>: enumerated values</p>
<ul id="EN-US_TOPIC_0000001764650352__uf35fa0112c9f45ccafb71604dd1de633"><li id="EN-US_TOPIC_0000001764650352__l527a012782224bf58f908635ea0991da"><strong id="EN-US_TOPIC_0000001764650352__b151712276034730">pl</strong> indicates that only procedural language functions are traced.</li><li id="EN-US_TOPIC_0000001764650352__ld34e08a2e47e4853baa36c31d2eb7658"><strong id="EN-US_TOPIC_0000001764650352__b104712267434730">all</strong> indicates that SQL and C language functions are traced.</li><li id="EN-US_TOPIC_0000001764650352__ld8725d2ef87e4c9dae3c54d153f13843"><strong id="EN-US_TOPIC_0000001764650352__b14212774234730">none</strong> indicates that the function tracing function is disabled.</li></ul>
<p id="EN-US_TOPIC_0000001764650352__a59887972dd6b46baa46e05ac53c8703f"><strong id="EN-US_TOPIC_0000001764650352__b37632759_4">Default value</strong>: none</p>
</div>
<div class="section" id="EN-US_TOPIC_0000001764650352__sbaa4811f93854c53acaba7e87b29ee4e"><h4 class="sectiontitle">update_process_title</h4><p id="EN-US_TOPIC_0000001764650352__af29570915c4f4b5f96b0b527c91691a5"><strong id="EN-US_TOPIC_0000001764650352__b158936292410">Parameter description:</strong> Collects statistics updated with a process name each time the server receives a new SQL statement.</p>
<p id="EN-US_TOPIC_0000001764650352__a25aed4f8598d4b0ca42d56f8cdcbd218">The process name can be viewed on Windows task manager by running the <strong id="EN-US_TOPIC_0000001764650352__b842352706174418">ps</strong> command.</p>
<p id="EN-US_TOPIC_0000001764650352__a2b161f2e47f247e192eafc9f492e25d7"><strong id="EN-US_TOPIC_0000001764650352__b541629191817">Type</strong>: SUSET</p>
<p id="EN-US_TOPIC_0000001764650352__a5fbc91a8d7c24d07bbabcc2b74531768"><strong id="EN-US_TOPIC_0000001764650352__b595466559">Value range</strong>: Boolean</p>
<ul id="EN-US_TOPIC_0000001764650352__u959ff9d30bb946d69494805f92e8c9c7"><li id="EN-US_TOPIC_0000001764650352__lf7d19903ccc847b1a6df6364cd4425e2"><strong id="EN-US_TOPIC_0000001764650352__b95294006034730">on</strong> indicates that the statistics collection function is enabled.</li><li id="EN-US_TOPIC_0000001764650352__lb5c82b333915429b88fbc2e4d1786b69"><strong id="EN-US_TOPIC_0000001764650352__b91962739534730">off</strong> indicates that the statistics collection function is disabled.</li></ul>
<p id="EN-US_TOPIC_0000001764650352__ade83b8cacaa24dc6998f72e03d3d4373"><strong id="EN-US_TOPIC_0000001764650352__b1844703994">Default value</strong>: <strong id="EN-US_TOPIC_0000001764650352__b925243339">off</strong></p>
</div>
<div class="section" id="EN-US_TOPIC_0000001764650352__s7250d9d0b57049cea8fbdec409b1d7b4"><h4 class="sectiontitle">track_thread_wait_status_interval</h4><p id="EN-US_TOPIC_0000001764650352__ac88aee8ac4884e5d99fd102ad20a950c"><strong id="EN-US_TOPIC_0000001764650352__en-us_topic_0059779313_a95f1b87b22144798ae615b10aa9c869e">Parameter description</strong>: Specifies the interval of collecting the thread status information periodically.</p>
<p id="EN-US_TOPIC_0000001764650352__ad29a976cce144182bf01b552010fbc3a"><strong id="EN-US_TOPIC_0000001764650352__b102341632201816">Type</strong>: SUSET</p>
<p id="EN-US_TOPIC_0000001764650352__ab94c5ab0d74a4eac9f2ffccc6db78962"><strong id="EN-US_TOPIC_0000001764650352__b2159121413193">Value range</strong>: an integer ranging from 0 to 1440, in minutes.</p>
<p id="EN-US_TOPIC_0000001764650352__a17f960a6d3c649c9b007c86e5ae7c836"><strong id="EN-US_TOPIC_0000001764650352__b1810715512338">Default value</strong>: <strong id="EN-US_TOPIC_0000001764650352__b2108454332">30min</strong></p>
</div>
<div class="section" id="EN-US_TOPIC_0000001764650352__section05051855154013"><h4 class="sectiontitle">enable_save_datachanged_timestamp</h4><p id="EN-US_TOPIC_0000001764650352__p1350616554403"><strong id="EN-US_TOPIC_0000001764650352__b1111846162412">Parameter description</strong>: Specifies whether to record the time when <strong id="EN-US_TOPIC_0000001764650352__b911914618246">INSERT</strong>, <strong id="EN-US_TOPIC_0000001764650352__b5119664241">UPDATE</strong>, <strong id="EN-US_TOPIC_0000001764650352__b15119268247">DELETE</strong>, or <strong id="EN-US_TOPIC_0000001764650352__b312014682411">EXCHANGE</strong>/<strong id="EN-US_TOPIC_0000001764650352__b9120126112419">TRUNCATE</strong>/<strong id="EN-US_TOPIC_0000001764650352__b512176172412">DROP</strong> <strong id="EN-US_TOPIC_0000001764650352__b1312113652412">PARTITION</strong> is performed on table data.</p>
<p id="EN-US_TOPIC_0000001764650352__p14506135515402"><strong id="EN-US_TOPIC_0000001764650352__b17241633121819">Type</strong>: USERSET</p>
<p id="EN-US_TOPIC_0000001764650352__p19642151714318"><strong id="EN-US_TOPIC_0000001764650352__b47311219203317">Value range</strong>: Boolean</p>
<ul id="EN-US_TOPIC_0000001764650352__ul16258449144318"><li id="EN-US_TOPIC_0000001764650352__li1325818495433"><strong id="EN-US_TOPIC_0000001764650352__b1661952153310">on</strong> indicates that the time when an operation is performed on table data will be recorded.</li><li id="EN-US_TOPIC_0000001764650352__li725934934318"><strong id="EN-US_TOPIC_0000001764650352__b18111923113319">off</strong> indicates that the time when an operation is performed on table data will not be recorded.</li></ul>
<p id="EN-US_TOPIC_0000001764650352__p185061855204014"><strong id="EN-US_TOPIC_0000001764650352__b842352706172223">Default value</strong>: on</p>
</div>
<div class="section" id="EN-US_TOPIC_0000001764650352__section362165821612"><h4 class="sectiontitle">enable_save_dataaccess_timestamp</h4><p id="EN-US_TOPIC_0000001764650352__p1762135801612"><strong id="EN-US_TOPIC_0000001764650352__b99461713152416">Parameter description</strong>: Specifies whether to record the last access time of a table. This parameter is supported only by 8.2.1.210 and later cluster versions.</p>
<p id="EN-US_TOPIC_0000001764650352__p14621195891618"><strong id="EN-US_TOPIC_0000001764650352__b900950148">Type</strong>: USERSET</p>
<p id="EN-US_TOPIC_0000001764650352__p116211258131615"><strong id="EN-US_TOPIC_0000001764650352__b1504442364">Value range</strong>: Boolean</p>
<ul id="EN-US_TOPIC_0000001764650352__ul56211958121611"><li id="EN-US_TOPIC_0000001764650352__li186212058181613"><strong id="EN-US_TOPIC_0000001764650352__b202398503309">on</strong> indicates that the last access time of the table is recorded.</li><li id="EN-US_TOPIC_0000001764650352__li10621185810164"><strong id="EN-US_TOPIC_0000001764650352__b1928107316">off</strong> indicates that the last access time of the table is not recorded.</li></ul>
<p id="EN-US_TOPIC_0000001764650352__p36211158131617"><strong id="EN-US_TOPIC_0000001764650352__b2081215199">Default value</strong>: <strong id="EN-US_TOPIC_0000001764650352__b1127612141">off</strong></p>
</div>
<div class="section" id="EN-US_TOPIC_0000001764650352__section1177915311186"><h4 class="sectiontitle">instr_unique_sql_count</h4><p id="EN-US_TOPIC_0000001764650352__p043243082211"><strong id="EN-US_TOPIC_0000001764650352__b18939750122011">Parameter description</strong>: Specifies whether to collect Unique SQL statements and the maximum number allowed.</p>
<p id="EN-US_TOPIC_0000001764650352__p32152031165311"><strong id="EN-US_TOPIC_0000001764650352__b377483315182">Type</strong>: SIGHUP</p>
<p id="EN-US_TOPIC_0000001764650352__p207791435182"><strong id="EN-US_TOPIC_0000001764650352__b066513732013">Value range</strong>: an integer ranging from 0 to INT_MAX</p>
<ul id="EN-US_TOPIC_0000001764650352__ul19514928101410"><li id="EN-US_TOPIC_0000001764650352__li1351410282146">If it is set to <strong id="EN-US_TOPIC_0000001764650352__b15590202613316">0</strong>, Unique SQL statistics are not collected.</li><li id="EN-US_TOPIC_0000001764650352__li12514182861417">If the value is greater than <strong id="EN-US_TOPIC_0000001764650352__b13146124115584">0</strong>, the number of Unique SQL statements collected on the CN cannot exceed the value of this parameter. When the number of collected Unique SQL statements reaches the upper limit, the collection is stopped. In this case, you can increase the value of <strong id="EN-US_TOPIC_0000001764650352__b13371102217598">reload</strong> to continue the collection.</li></ul>
<p id="EN-US_TOPIC_0000001764650352__p1779113101820"><strong id="EN-US_TOPIC_0000001764650352__en-us_topic_0059778487_a023402ff020d43919b2d4639671ceb32">Default value</strong>: <strong id="EN-US_TOPIC_0000001764650352__en-us_topic_0059778487_en-us_topic_0058967649_b842352706195030">0</strong></p>
<div class="caution" id="EN-US_TOPIC_0000001764650352__note69212415183"><span class="cautiontitle"><img src="public_sys-resources/caution_3.0-en-us.png"> </span><div class="cautionbody"><p id="EN-US_TOPIC_0000001764650352__p492117418181">If a new value is smaller than the original value, the Unique SQL statistics collected on the CN will be cleared. </p>
</div></div>
</div>
<div class="section" id="EN-US_TOPIC_0000001764650352__section6524929122813"><h4 class="sectiontitle">track_sql_count</h4><p id="EN-US_TOPIC_0000001764650352__p465812451251"><strong id="EN-US_TOPIC_0000001764650352__b91241933153110">Parameter description</strong>: Specifies whether to collect statistics on the number of the <strong id="EN-US_TOPIC_0000001764650352__b11125833103113">SELECT</strong>, <strong id="EN-US_TOPIC_0000001764650352__b412517335316">INSERT</strong>, <strong id="EN-US_TOPIC_0000001764650352__b2012643373113">UPDATE</strong>, <strong id="EN-US_TOPIC_0000001764650352__b1612643312313">DELETE</strong>, and <strong id="EN-US_TOPIC_0000001764650352__b17127143318316">MERGE INTO</strong> statements that are being executed in each session, the response time of the <strong id="EN-US_TOPIC_0000001764650352__b18127533153112">SELECT</strong>, <strong id="EN-US_TOPIC_0000001764650352__b171281933133119">INSERT</strong>, <strong id="EN-US_TOPIC_0000001764650352__b17128433133112">UPDATE</strong>, and <strong id="EN-US_TOPIC_0000001764650352__b10129333133113">DELETE</strong> statements, and the number of DDL, DML, and DCL statements.</p>
<p id="EN-US_TOPIC_0000001764650352__p14803420104619"><strong id="EN-US_TOPIC_0000001764650352__b153813352182">Type</strong>: SUSET</p>
<p id="EN-US_TOPIC_0000001764650352__p14803142015468"><strong id="EN-US_TOPIC_0000001764650352__b1246562947">Value range</strong>: Boolean</p>
<ul id="EN-US_TOPIC_0000001764650352__ul9805122015469"><li id="EN-US_TOPIC_0000001764650352__li19805142014614"><strong id="EN-US_TOPIC_0000001764650352__b690918121516">on</strong> indicates that the statistics collection function is enabled.</li><li id="EN-US_TOPIC_0000001764650352__li5806820164614"><strong id="EN-US_TOPIC_0000001764650352__b103319198511">off</strong> indicates that the statistics collection function is disabled.</li></ul>
<p id="EN-US_TOPIC_0000001764650352__p98071520174610"><strong id="EN-US_TOPIC_0000001764650352__b14551021134012">Default value</strong>: <strong id="EN-US_TOPIC_0000001764650352__b4621321184010">on</strong></p>
<div class="note" id="EN-US_TOPIC_0000001764650352__note109116432373"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="EN-US_TOPIC_0000001764650352__ul51138231"><li id="EN-US_TOPIC_0000001764650352__li811188039">The <strong id="EN-US_TOPIC_0000001764650352__b1031817261221">track_sql_count</strong> parameter is restricted by the <strong id="EN-US_TOPIC_0000001764650352__b11241730162218">track_activities</strong> parameter.<ul id="EN-US_TOPIC_0000001764650352__ul33132218475"><li id="EN-US_TOPIC_0000001764650352__li367816198474">If <strong id="EN-US_TOPIC_0000001764650352__b31311736193111">track_activities</strong> is set to <strong id="EN-US_TOPIC_0000001764650352__b81320364312">on</strong> and <strong id="EN-US_TOPIC_0000001764650352__b151331436163112">track_sql_count</strong> is set to <strong id="EN-US_TOPIC_0000001764650352__b21332369312">off</strong>, a warning message indicating that <strong id="EN-US_TOPIC_0000001764650352__b71348362317">track_sql_count</strong> is disabled will be displayed when the view <strong id="EN-US_TOPIC_0000001764650352__b1513423633115">gs_sql_count</strong>, <strong id="EN-US_TOPIC_0000001764650352__b113519365319">pgxc_sql_count</strong>, <strong id="EN-US_TOPIC_0000001764650352__b4135173618318">gs_workload_sql_count</strong>, <strong id="EN-US_TOPIC_0000001764650352__b191364367313">pgxc_workload_sql_count</strong>, <strong id="EN-US_TOPIC_0000001764650352__b12136153612312">global_workload_sql_count</strong>, <strong id="EN-US_TOPIC_0000001764650352__b191377369317">gs_workload_sql_elapse_time</strong>, <strong id="EN-US_TOPIC_0000001764650352__b91381436143117">pgxc_workload_sql_elapse_time</strong>, or <strong id="EN-US_TOPIC_0000001764650352__b4138136163119">global_workload_sql_elapse_time</strong> are queried.</li><li id="EN-US_TOPIC_0000001764650352__li56783198477">If both <strong id="EN-US_TOPIC_0000001764650352__b1767823916319">track_activities</strong> and <strong id="EN-US_TOPIC_0000001764650352__b1767993916315">track_sql_count</strong> are set to <strong id="EN-US_TOPIC_0000001764650352__b196801539143120">off</strong>, two logs indicating that <strong id="EN-US_TOPIC_0000001764650352__b168012393315">track_activities</strong> is disabled and <strong id="EN-US_TOPIC_0000001764650352__b168163916316">track_sql_count</strong> is disabled will be displayed when the views are queried.</li><li id="EN-US_TOPIC_0000001764650352__li13678219194710">If <strong id="EN-US_TOPIC_0000001764650352__b52641933142613">track_activities</strong> is set to <strong id="EN-US_TOPIC_0000001764650352__b128906391262">off</strong> and <strong id="EN-US_TOPIC_0000001764650352__b718634611265">track_sql_count</strong> is set to <strong id="EN-US_TOPIC_0000001764650352__b132239550262">on</strong>, a log indicating that <strong id="EN-US_TOPIC_0000001764650352__b921715102419">track_activities</strong> is disabled will be displayed when the views are queried.</li></ul>
</li></ul>
<ul id="EN-US_TOPIC_0000001764650352__ul14749111933"><li id="EN-US_TOPIC_0000001764650352__li774961116317">If this parameter is disabled, querying the view returns <strong id="EN-US_TOPIC_0000001764650352__b523120337479">0</strong>.</li></ul>
</div></div>
</div>
<div class="section" id="EN-US_TOPIC_0000001764650352__section19153645121311"><h4 class="sectiontitle">enable_parallel_analyze</h4><p id="EN-US_TOPIC_0000001764650352__p05595204820"><strong id="EN-US_TOPIC_0000001764650352__b114736228220">Parameter description</strong>: Specifies whether to use parallel sampling for internal and foreign table analysis. This parameter is supported only by clusters of version 9.1.0 or later.</p>
<p id="EN-US_TOPIC_0000001764650352__p455942194815"><strong id="EN-US_TOPIC_0000001764650352__b972967952">Type</strong>: USERSET</p>
<p id="EN-US_TOPIC_0000001764650352__p11559223485"><strong id="EN-US_TOPIC_0000001764650352__b158075662410545">Value range</strong>: Boolean</p>
<ul id="EN-US_TOPIC_0000001764650352__ul833410818311"><li id="EN-US_TOPIC_0000001764650352__li23344823116"><strong id="EN-US_TOPIC_0000001764650352__b698751442417">true</strong> indicates that parallel sampling is used for internal and foreign table analysis.</li><li id="EN-US_TOPIC_0000001764650352__li1866531703116"><strong id="EN-US_TOPIC_0000001764650352__b330394016249">false</strong> indicates that parallel sampling is not used for internal and foreign table analysis.</li></ul>
<p id="EN-US_TOPIC_0000001764650352__p13560323484"><strong id="EN-US_TOPIC_0000001764650352__b184841439164720">Default value</strong>: <strong id="EN-US_TOPIC_0000001764650352__b13484183916474">true</strong></p>
<div class="caution" id="EN-US_TOPIC_0000001764650352__note16123195610231"><span class="cautiontitle"><img src="public_sys-resources/caution_3.0-en-us.png"> </span><div class="cautionbody"><ul id="EN-US_TOPIC_0000001764650352__ul2494184854315"><li id="EN-US_TOPIC_0000001764650352__li101713820184">When <strong id="EN-US_TOPIC_0000001764650352__b2085617092613">enable_parallel_analyze</strong> is set to <strong id="EN-US_TOPIC_0000001764650352__b1871411237332">true</strong> and analyzing foreign tables, try to avoid adding NOT NULL constraints to the target foreign table columns to prevent constraint failure due to data source changes. Currently, parallel sampling does not support materialized views. If analyze fails due to such reasons, set this parameter to <strong id="EN-US_TOPIC_0000001764650352__b109721117182718">false</strong>.</li><li id="EN-US_TOPIC_0000001764650352__li15417144915434">Currently, parallel sampling only supports analyzing ordinary column-store internal tables. This optimization does not take effect when the internal table uses hstore/hstore_opt or is declared as a replicated table.</li><li id="EN-US_TOPIC_0000001764650352__li1050783111506">Currently, parallel sampling only supports analyzing foreign tables stored in parquet/orc format. This optimization does not take effect when the foreign table is in another format.</li></ul>
</div></div>
</div>
<div class="section" id="EN-US_TOPIC_0000001764650352__section591121392216"><h4 class="sectiontitle">parallel_analyze_workers</h4><p id="EN-US_TOPIC_0000001764650352__p639493195013"><strong id="EN-US_TOPIC_0000001764650352__b173941532502">Parameter description</strong>: Specifies the number of concurrent threads for parallel analyze sampling. This parameter is supported only by clusters of version 9.1.0 or later.</p>
<p id="EN-US_TOPIC_0000001764650352__p13941038508"><strong id="EN-US_TOPIC_0000001764650352__b1090201657">Type</strong>: USERSET</p>
<p id="EN-US_TOPIC_0000001764650352__p2394837505"><strong id="EN-US_TOPIC_0000001764650352__b156471634163418">Value range</strong>: an integer ranging from 0 to 64</p>
<p id="EN-US_TOPIC_0000001764650352__p1539412314503"><strong id="EN-US_TOPIC_0000001764650352__b12911438203420">Default value</strong>: <strong id="EN-US_TOPIC_0000001764650352__b12911381341">10</strong></p>
<div class="note" id="EN-US_TOPIC_0000001764650352__note15991185219248"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="EN-US_TOPIC_0000001764650352__p6364111814392">The value of this parameter should correspond to the cluster load. When the cluster load is low, you can increase the parameter value appropriately based on the cluster configuration to further improve the efficiency of analyze execution.</p>
</div></div>
</div>
<div class="section" id="EN-US_TOPIC_0000001764650352__section8898124717226"><h4 class="sectiontitle">analyze_sample_multiplier</h4><p id="EN-US_TOPIC_0000001764650352__p1788911143916"><strong id="EN-US_TOPIC_0000001764650352__b1927121933616">Parameter description</strong>: Specifies the multiplier for the stripe sampling rate used in analyzing foreign tables. This parameter is supported only by clusters of version 9.1.0 or later.</p>
<p id="EN-US_TOPIC_0000001764650352__p1588911193916"><strong id="EN-US_TOPIC_0000001764650352__b613581588">Type</strong>: SUSET</p>
<p id="EN-US_TOPIC_0000001764650352__p78891816393"><strong id="EN-US_TOPIC_0000001764650352__b1680425173715">Value range</strong>: an integer ranging from 0 to 100. <strong id="EN-US_TOPIC_0000001764650352__b9967209133711">0</strong> indicates that the stripe sampling rate is 100%.</p>
<p id="EN-US_TOPIC_0000001764650352__p7889121103915"><strong id="EN-US_TOPIC_0000001764650352__b121903622123324">Default value</strong>: <strong id="EN-US_TOPIC_0000001764650352__b21483781623324">3</strong></p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dws_04_0919.html">Runtime Statistics</a></div>
</div>
</div>