forked from docs/doc-exports
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com> Co-authored-by: Lu, Huayi <luhuayi@huawei.com> Co-committed-by: Lu, Huayi <luhuayi@huawei.com>
117 lines
33 KiB
HTML
117 lines
33 KiB
HTML
<a name="EN-US_TOPIC_0000001233883261"></a><a name="EN-US_TOPIC_0000001233883261"></a>
|
|
|
|
<h1 class="topictitle1">Query and Index Statistics Collector</h1>
|
|
<div id="body8662426"><p id="EN-US_TOPIC_0000001233883261__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_0000001233883261__s6b0083cc3bcb40879807c215decb9389"><h4 class="sectiontitle">track_activities</h4><p id="EN-US_TOPIC_0000001233883261__afc7bc348f37c49dca0783e4039868b41"><strong id="EN-US_TOPIC_0000001233883261__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_0000001233883261__a10f26ff57c00455b82f72ff6efb35659"><strong id="EN-US_TOPIC_0000001233883261__b62701982181">Type</strong>: SUSET</p>
|
|
<p id="EN-US_TOPIC_0000001233883261__a583707d5ab254356bf3c14df911303dd"><strong id="EN-US_TOPIC_0000001233883261__en-us_topic_0059779313_en-us_topic_0058967616_b25312147">Value range</strong>: Boolean</p>
|
|
<ul id="EN-US_TOPIC_0000001233883261__ua9d86060549f4285b9934041d41e721b"><li id="EN-US_TOPIC_0000001233883261__l96d88df594954e2db405610cfee8eff3"><strong id="EN-US_TOPIC_0000001233883261__b195366746634730">on</strong> indicates that the statistics collection function is enabled.</li><li id="EN-US_TOPIC_0000001233883261__l93111d9afd42412bb1dd8a855e7d3fd6"><strong id="EN-US_TOPIC_0000001233883261__b30774405134730">off</strong> indicates that the statistics collection function is disabled.</li></ul>
|
|
<p id="EN-US_TOPIC_0000001233883261__ae5fd84f154b34dcebc888bc171597457"><strong id="EN-US_TOPIC_0000001233883261__b842352706171026">Default value</strong>: <strong id="EN-US_TOPIC_0000001233883261__b842352706171029">on</strong></p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001233883261__s4682d08468f84845bfdc6ae9477126e8"><a name="EN-US_TOPIC_0000001233883261__s4682d08468f84845bfdc6ae9477126e8"></a><a name="s4682d08468f84845bfdc6ae9477126e8"></a><h4 class="sectiontitle">track_counts</h4><p id="EN-US_TOPIC_0000001233883261__ac5acba713a4f4aceb58c70135737321e"><strong id="EN-US_TOPIC_0000001233883261__en-us_topic_0059779313_ab754efb333a940448f416f9896ab02fc">Parameter description</strong>: Collects statistics about data activities.</p>
|
|
<p id="EN-US_TOPIC_0000001233883261__p44114392542"><strong id="EN-US_TOPIC_0000001233883261__b1430151131820">Type</strong>: SUSET</p>
|
|
<p id="EN-US_TOPIC_0000001233883261__a8579e1dd57bf44189f48cca0390a49cc"><strong id="EN-US_TOPIC_0000001233883261__b930805292">Value range</strong>: Boolean</p>
|
|
<ul id="EN-US_TOPIC_0000001233883261__u905ec35ac6bb429baa77d426d115329a"><li id="EN-US_TOPIC_0000001233883261__l9568273b2eb345f8b0e3b6d4060ae265"><strong id="EN-US_TOPIC_0000001233883261__b86685220434730">on</strong> indicates that the statistics collection function is enabled.</li><li id="EN-US_TOPIC_0000001233883261__l24bd614f6a39426d95ddc2afe1b112d5"><strong id="EN-US_TOPIC_0000001233883261__b134521767334730">off</strong> indicates that the statistics collection function is disabled.</li></ul>
|
|
<div class="note" id="EN-US_TOPIC_0000001233883261__ncc6586d09c57407199105c318161e600"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="EN-US_TOPIC_0000001233883261__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_0000001233883261__b84235270618824">on</strong>.</p>
|
|
</div></div>
|
|
<p id="EN-US_TOPIC_0000001233883261__aa144fd15ed3f4054ac265066d87a9776"><strong id="EN-US_TOPIC_0000001233883261__b19573715114114">Default value</strong>: <strong id="EN-US_TOPIC_0000001233883261__b842352706172116">on</strong></p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001233883261__s7ac4a5a51fff49d4984bcaa9133fa47e"><h4 class="sectiontitle">track_io_timing</h4><p id="EN-US_TOPIC_0000001233883261__ad30d5296f13d4cfbba811c8f93fc7b27"><strong id="EN-US_TOPIC_0000001233883261__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_0000001233883261__b137617752834730">pg_stat_database</strong> parameter.</p>
|
|
<p id="EN-US_TOPIC_0000001233883261__a7c62999d1bbc421bbe7d1304d0d3c546"><strong id="EN-US_TOPIC_0000001233883261__b12392161621816">Type</strong>: SUSET</p>
|
|
<p id="EN-US_TOPIC_0000001233883261__a04f5ebe55bf84ba2ade9a1ae0a34cbc2"><strong id="EN-US_TOPIC_0000001233883261__en-us_topic_0059779313_en-us_topic_0058967616_b18806975">Value range</strong>: Boolean</p>
|
|
<ul id="EN-US_TOPIC_0000001233883261__ucecc3d59bf924ec494e1550f8c69ff2c"><li id="EN-US_TOPIC_0000001233883261__l865470681df1462098f37a9f9482a31a">If this parameter is set to <strong id="EN-US_TOPIC_0000001233883261__b8423527061898">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_0000001233883261__b68462588434730">off</strong>.</li><li id="EN-US_TOPIC_0000001233883261__l499426b0651640f3bdc62e3b80f450ef"><strong id="EN-US_TOPIC_0000001233883261__b149413381134730">off</strong> indicates that the statistics collection function is disabled.</li></ul>
|
|
<p id="EN-US_TOPIC_0000001233883261__af063406b51a44e118f8d719aa0684ada"><strong id="EN-US_TOPIC_0000001233883261__b55233292105553">Default value</strong>: <strong id="EN-US_TOPIC_0000001233883261__b842352706172155">off</strong></p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001233883261__s1677358074964556a69b04fe72b6f870"><h4 class="sectiontitle">track_functions</h4><p id="EN-US_TOPIC_0000001233883261__a3136546134e5489cbffead378c877b44"><strong id="EN-US_TOPIC_0000001233883261__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_0000001233883261__a7c0d3f1bfe224a759215c60000765050"><strong id="EN-US_TOPIC_0000001233883261__b13268141771813">Type</strong>: SUSET</p>
|
|
<div class="notice" id="EN-US_TOPIC_0000001233883261__n5f8b16dc70164e7284827539b4ccde38"><span class="noticetitle"><img src="public_sys-resources/notice_3.0-en-us.png"> </span><div class="noticebody"><p id="EN-US_TOPIC_0000001233883261__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_0000001233883261__a3ffab0ba9a3d49b0bb9ef2443e233a69"><strong id="EN-US_TOPIC_0000001233883261__en-us_topic_0059779313_en-us_topic_0058967616_b33749742">Value range</strong>: enumerated values</p>
|
|
<ul id="EN-US_TOPIC_0000001233883261__uf35fa0112c9f45ccafb71604dd1de633"><li id="EN-US_TOPIC_0000001233883261__l527a012782224bf58f908635ea0991da"><strong id="EN-US_TOPIC_0000001233883261__b151712276034730">pl</strong> indicates that only procedural language functions are traced.</li><li id="EN-US_TOPIC_0000001233883261__ld34e08a2e47e4853baa36c31d2eb7658"><strong id="EN-US_TOPIC_0000001233883261__b104712267434730">all</strong> indicates that SQL and C language functions are traced.</li><li id="EN-US_TOPIC_0000001233883261__ld8725d2ef87e4c9dae3c54d153f13843"><strong id="EN-US_TOPIC_0000001233883261__b14212774234730">none</strong> indicates that the function tracing function is disabled.</li></ul>
|
|
<p id="EN-US_TOPIC_0000001233883261__a59887972dd6b46baa46e05ac53c8703f"><strong id="EN-US_TOPIC_0000001233883261__b37632759_4">Default value</strong>: none</p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001233883261__s76d000c5622f476a9e193a99266f181a"><h4 class="sectiontitle">track_activity_query_size</h4><p id="EN-US_TOPIC_0000001233883261__a07e3d77c9fde4ed288127fd1cc17f9a7"><strong id="EN-US_TOPIC_0000001233883261__en-us_topic_0059779313_abd1fd520ffaf4608af5142d74cb38f3f">Parameter description</strong>: Specifies byte counts of the current running commands used to trace each active session.</p>
|
|
<p id="EN-US_TOPIC_0000001233883261__p13005246552"><strong id="EN-US_TOPIC_0000001233883261__b192481189180">Type</strong>: POSTMASTER</p>
|
|
<p id="EN-US_TOPIC_0000001233883261__a3b7f20f39d324651a2dbfdaae7a8d821"><strong id="EN-US_TOPIC_0000001233883261__b1678152011815">Value range</strong>: an integer ranging from 100 to 102400</p>
|
|
<p id="EN-US_TOPIC_0000001233883261__a342efd77f97a4b3a9057329159528b7a"><strong id="EN-US_TOPIC_0000001233883261__b842352706174334">Default value</strong>: <strong id="EN-US_TOPIC_0000001233883261__b842352706174338">1024</strong></p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001233883261__sbaa4811f93854c53acaba7e87b29ee4e"><h4 class="sectiontitle">update_process_title</h4><p id="EN-US_TOPIC_0000001233883261__af29570915c4f4b5f96b0b527c91691a5"><strong id="EN-US_TOPIC_0000001233883261__en-us_topic_0059779313_en-us_topic_0058967616_b34989083">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_0000001233883261__a25aed4f8598d4b0ca42d56f8cdcbd218">The process name can be viewed on Windows task manager by running the <strong id="EN-US_TOPIC_0000001233883261__b842352706174418">ps</strong> command.</p>
|
|
<p id="EN-US_TOPIC_0000001233883261__a2b161f2e47f247e192eafc9f492e25d7"><strong id="EN-US_TOPIC_0000001233883261__b541629191817">Type</strong>: SUSET</p>
|
|
<p id="EN-US_TOPIC_0000001233883261__a5fbc91a8d7c24d07bbabcc2b74531768"><strong id="EN-US_TOPIC_0000001233883261__b41048637">Value range</strong>: Boolean</p>
|
|
<ul id="EN-US_TOPIC_0000001233883261__u959ff9d30bb946d69494805f92e8c9c7"><li id="EN-US_TOPIC_0000001233883261__lf7d19903ccc847b1a6df6364cd4425e2"><strong id="EN-US_TOPIC_0000001233883261__b95294006034730">on</strong> indicates that the statistics collection function is enabled.</li><li id="EN-US_TOPIC_0000001233883261__lb5c82b333915429b88fbc2e4d1786b69"><strong id="EN-US_TOPIC_0000001233883261__b91962739534730">off</strong> indicates that the statistics collection function is disabled.</li></ul>
|
|
<p id="EN-US_TOPIC_0000001233883261__ade83b8cacaa24dc6998f72e03d3d4373"><strong id="EN-US_TOPIC_0000001233883261__b248407402">Default value</strong>: <strong id="EN-US_TOPIC_0000001233883261__b165965686">off</strong></p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001233883261__s7250d9d0b57049cea8fbdec409b1d7b4"><h4 class="sectiontitle">track_thread_wait_status_interval</h4><p id="EN-US_TOPIC_0000001233883261__ac88aee8ac4884e5d99fd102ad20a950c"><strong id="EN-US_TOPIC_0000001233883261__en-us_topic_0059779313_a95f1b87b22144798ae615b10aa9c869e">Parameter description</strong>: Specifies the interval of collecting the thread status information periodically.</p>
|
|
<p id="EN-US_TOPIC_0000001233883261__ad29a976cce144182bf01b552010fbc3a"><strong id="EN-US_TOPIC_0000001233883261__b102341632201816">Type</strong>: SUSET</p>
|
|
<p id="EN-US_TOPIC_0000001233883261__ab94c5ab0d74a4eac9f2ffccc6db78962"><strong id="EN-US_TOPIC_0000001233883261__b106251620211">Value range</strong>: an integer ranging from 0 to 1440. The unit is minute (min).</p>
|
|
<p id="EN-US_TOPIC_0000001233883261__a17f960a6d3c649c9b007c86e5ae7c836"><strong id="EN-US_TOPIC_0000001233883261__b1810715512338">Default value</strong>: <strong id="EN-US_TOPIC_0000001233883261__b2108454332">30min</strong></p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001233883261__section05051855154013"><h4 class="sectiontitle">enable_save_datachanged_timestamp</h4><p id="EN-US_TOPIC_0000001233883261__p1350616554403"><strong id="EN-US_TOPIC_0000001233883261__b1272147153319">Parameter description</strong>: Specifies whether to record the time when <strong id="EN-US_TOPIC_0000001233883261__b772210714333">INSERT</strong>, <strong id="EN-US_TOPIC_0000001233883261__b12722172338">UPDATE</strong>, <strong id="EN-US_TOPIC_0000001233883261__b107236783312">DELETE</strong>, or <strong id="EN-US_TOPIC_0000001233883261__b163465157373">EXCHANGE</strong>/<strong id="EN-US_TOPIC_0000001233883261__b5154201715379">TRUNCATE</strong>/<strong id="EN-US_TOPIC_0000001233883261__b86001221183717">DROP</strong> <strong id="EN-US_TOPIC_0000001233883261__b1083814240371">PARTITION</strong> is performed on table data.</p>
|
|
<p id="EN-US_TOPIC_0000001233883261__p14506135515402"><strong id="EN-US_TOPIC_0000001233883261__b17241633121819">Type</strong>: USERSET</p>
|
|
<p id="EN-US_TOPIC_0000001233883261__p19642151714318"><strong id="EN-US_TOPIC_0000001233883261__b47311219203317">Value range</strong>: Boolean</p>
|
|
<ul id="EN-US_TOPIC_0000001233883261__ul16258449144318"><li id="EN-US_TOPIC_0000001233883261__li1325818495433"><strong id="EN-US_TOPIC_0000001233883261__b1661952153310">on</strong> indicates that the time when an operation is performed on table data will be recorded.</li><li id="EN-US_TOPIC_0000001233883261__li725934934318"><strong id="EN-US_TOPIC_0000001233883261__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_0000001233883261__p185061855204014"><strong id="EN-US_TOPIC_0000001233883261__b842352706172223">Default value</strong>: on</p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001233883261__section1177915311186"><h4 class="sectiontitle">instr_unique_sql_count</h4><p id="EN-US_TOPIC_0000001233883261__p043243082211"><strong id="EN-US_TOPIC_0000001233883261__b1849105615576">Parameter description</strong>: Specifies whether to collect Unique SQL statements and the maximum number of collected Unique SQL statements.</p>
|
|
<p id="EN-US_TOPIC_0000001233883261__p32152031165311"><strong id="EN-US_TOPIC_0000001233883261__b377483315182">Type</strong>: SIGHUP</p>
|
|
<p id="EN-US_TOPIC_0000001233883261__p207791435182"><strong id="EN-US_TOPIC_0000001233883261__b711815131219">Value range</strong>: an integer ranging from 0 to INT_MAX</p>
|
|
<ul id="EN-US_TOPIC_0000001233883261__ul19514928101410"><li id="EN-US_TOPIC_0000001233883261__li1351410282146">If it is set to <strong id="EN-US_TOPIC_0000001233883261__b18214163045812">0</strong>, Unique SQL statistics are not collected.</li><li id="EN-US_TOPIC_0000001233883261__li12514182861417">If the value is greater than <strong id="EN-US_TOPIC_0000001233883261__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_0000001233883261__b13371102217598">reload</strong> to continue the collection.</li></ul>
|
|
<p id="EN-US_TOPIC_0000001233883261__p1779113101820"><strong id="EN-US_TOPIC_0000001233883261__en-us_topic_0059778487_a023402ff020d43919b2d4639671ceb32">Default value</strong>: <strong id="EN-US_TOPIC_0000001233883261__en-us_topic_0059778487_en-us_topic_0058967649_b842352706195030">0</strong></p>
|
|
<div class="caution" id="EN-US_TOPIC_0000001233883261__note69212415183"><span class="cautiontitle"><img src="public_sys-resources/caution_3.0-en-us.png"> </span><div class="cautionbody"><p id="EN-US_TOPIC_0000001233883261__p492117418181">If a new value is less than the original value, the Unique SQL statistics collected on the corresponding CN will be cleared. Note that the clearing operation is performed by the background thread of the resource management module. If the GUC parameter <a href="dws_04_0922.html#EN-US_TOPIC_0000001233563121__sc1692143c357427cbeadd6160010fd40">use_workload_manager</a> is set to <strong id="EN-US_TOPIC_0000001233883261__b6676771944">off</strong>, the clearing operation may fail. In this case, you can use the <strong id="EN-US_TOPIC_0000001233883261__b11676773413">reset_instr_unique_sql</strong> function for clearing.</p>
|
|
</div></div>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001233883261__section139316451814"><a name="EN-US_TOPIC_0000001233883261__section139316451814"></a><a name="section139316451814"></a><h4 class="sectiontitle">instr_unique_sql_timeout</h4><p id="EN-US_TOPIC_0000001233883261__p99111251687"><strong id="EN-US_TOPIC_0000001233883261__b1872402111219">Parameter description</strong>: Specifies the lifetime of a Unique SQL statement. The background thread of StatCollector checks all Unique SQL statements every hour. If a Unique SQL statement is not executed for more than <strong id="EN-US_TOPIC_0000001233883261__b1480214479150">instr_unique_sql_timeout</strong> hours, the Unique SQL statement will be deleted. This feature is supported in 8.1.2 or later.</p>
|
|
<p id="EN-US_TOPIC_0000001233883261__p991165118810"><strong id="EN-US_TOPIC_0000001233883261__b4705171212166">Type</strong>: SIGHUP</p>
|
|
<p id="EN-US_TOPIC_0000001233883261__p199111651682"><strong id="EN-US_TOPIC_0000001233883261__b14556184095118">Value range</strong>: an integer ranging from <strong id="EN-US_TOPIC_0000001233883261__b455654095112">0</strong> to <strong id="EN-US_TOPIC_0000001233883261__b75572040105113">INT_MAX</strong>. The unit is hour.</p>
|
|
<ul id="EN-US_TOPIC_0000001233883261__ul49111251189"><li id="EN-US_TOPIC_0000001233883261__li19911351182">The value <strong id="EN-US_TOPIC_0000001233883261__b0321313181912">0</strong> indicates that expired Unique SQL statements will not be deleted.</li><li id="EN-US_TOPIC_0000001233883261__li391155115810">If the value is greater than <strong id="EN-US_TOPIC_0000001233883261__b1492540193">0</strong>, the Unique SQL statement that is not executed for more than <strong id="EN-US_TOPIC_0000001233883261__b1834533418166">instr_unique_sql_timeout</strong> hours will be deleted.</li></ul>
|
|
<p id="EN-US_TOPIC_0000001233883261__p109111451282"><strong id="EN-US_TOPIC_0000001233883261__b15625350168">Default value</strong>: <strong id="EN-US_TOPIC_0000001233883261__b1156213511614">24</strong></p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001233883261__section6524929122813"><h4 class="sectiontitle">track_sql_count</h4><p id="EN-US_TOPIC_0000001233883261__p465812451251"><strong id="EN-US_TOPIC_0000001233883261__b19328621734">Parameter description</strong>: Specifies whether to collect statistics on the number of the <strong id="EN-US_TOPIC_0000001233883261__b15210652043">SELECT</strong>, <strong id="EN-US_TOPIC_0000001233883261__b75842711413">INSERT</strong>, <strong id="EN-US_TOPIC_0000001233883261__b18259101649">UPDATE</strong>, <strong id="EN-US_TOPIC_0000001233883261__b99926121846">DELETE</strong>, and <strong id="EN-US_TOPIC_0000001233883261__b892513161848">MERGE INTO</strong> statements that are being executed in each session, the response time of the <strong id="EN-US_TOPIC_0000001233883261__b185511442412">SELECT</strong>, <strong id="EN-US_TOPIC_0000001233883261__b1546547248">INSERT</strong>, <strong id="EN-US_TOPIC_0000001233883261__b1235812492410">UPDATE</strong>, and <strong id="EN-US_TOPIC_0000001233883261__b8351553144">DELETE</strong> statements, and the number of DDL, DML, and DCL statements.</p>
|
|
<p id="EN-US_TOPIC_0000001233883261__p14803420104619"><strong id="EN-US_TOPIC_0000001233883261__b153813352182">Type</strong>: SUSET</p>
|
|
<p id="EN-US_TOPIC_0000001233883261__p14803142015468"><strong id="EN-US_TOPIC_0000001233883261__b2018103534">Value range</strong>: Boolean</p>
|
|
<ul id="EN-US_TOPIC_0000001233883261__ul9805122015469"><li id="EN-US_TOPIC_0000001233883261__li19805142014614"><strong id="EN-US_TOPIC_0000001233883261__b690918121516">on</strong> indicates that the statistics collection function is enabled.</li><li id="EN-US_TOPIC_0000001233883261__li5806820164614"><strong id="EN-US_TOPIC_0000001233883261__b103319198511">off</strong> indicates that the statistics collection function is disabled.</li></ul>
|
|
<p id="EN-US_TOPIC_0000001233883261__p98071520174610"><strong id="EN-US_TOPIC_0000001233883261__b14551021134012">Default value</strong>: <strong id="EN-US_TOPIC_0000001233883261__b4621321184010">on</strong></p>
|
|
<div class="note" id="EN-US_TOPIC_0000001233883261__note109116432373"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="EN-US_TOPIC_0000001233883261__ul51138231"><li id="EN-US_TOPIC_0000001233883261__li811188039">The <strong id="EN-US_TOPIC_0000001233883261__b1031817261221">track_sql_count</strong> parameter is restricted by the <strong id="EN-US_TOPIC_0000001233883261__b11241730162218">track_activities</strong> parameter.<ul id="EN-US_TOPIC_0000001233883261__ul33132218475"><li id="EN-US_TOPIC_0000001233883261__li367816198474">If <strong id="EN-US_TOPIC_0000001233883261__b64971154172217">track_activities</strong> is set to <strong id="EN-US_TOPIC_0000001233883261__b1954342382319">on</strong> and <strong id="EN-US_TOPIC_0000001233883261__b1748002682319">track_sql_count</strong> is set to <strong id="EN-US_TOPIC_0000001233883261__b18138113292316">off</strong>, a warning message indicating that <strong id="EN-US_TOPIC_0000001233883261__b921715102419">track_sql_count</strong> is disabled will be displayed when the view <strong id="EN-US_TOPIC_0000001233883261__b132962217617">gs_sql_count</strong>, <strong id="EN-US_TOPIC_0000001233883261__b18534125711612">pgxc_sql_count</strong>, <strong id="EN-US_TOPIC_0000001233883261__b192661121977">gs_workload_sql_count</strong>, <strong id="EN-US_TOPIC_0000001233883261__b85225292718">pgxc_workload_sql_count</strong>, <strong id="EN-US_TOPIC_0000001233883261__b551557777">global_workload_sql_count</strong>, <strong id="EN-US_TOPIC_0000001233883261__b797910713814">gs_workload_sql_elapse_time</strong>, <strong id="EN-US_TOPIC_0000001233883261__b141575178814">pgxc_workload_sql_elapse_time</strong>, or <strong id="EN-US_TOPIC_0000001233883261__b2922129088">global_workload_sql_elapse_time</strong> are queried.</li><li id="EN-US_TOPIC_0000001233883261__li56783198477">If both <strong id="EN-US_TOPIC_0000001233883261__b621255932412">track_activities</strong> and <strong id="EN-US_TOPIC_0000001233883261__b145872182512">track_sql_count</strong> are set to <strong id="EN-US_TOPIC_0000001233883261__b1613310952516">off</strong>, two logs indicating that <strong id="EN-US_TOPIC_0000001233883261__b127900425253">track_activities</strong> is disabled and <strong id="EN-US_TOPIC_0000001233883261__b6523114514252">track_sql_count</strong> is disabled will be displayed when the views are queried.</li><li id="EN-US_TOPIC_0000001233883261__li13678219194710">If <strong id="EN-US_TOPIC_0000001233883261__b52641933142613">track_activities</strong> is set to <strong id="EN-US_TOPIC_0000001233883261__b128906391262">off</strong> and <strong id="EN-US_TOPIC_0000001233883261__b718634611265">track_sql_count</strong> is set to <strong id="EN-US_TOPIC_0000001233883261__b132239550262">on</strong>, a log indicating that <strong id="EN-US_TOPIC_0000001233883261__b944218035">track_activities</strong> is disabled will be displayed when the views are queried.</li></ul>
|
|
</li></ul>
|
|
<ul id="EN-US_TOPIC_0000001233883261__ul14749111933"><li id="EN-US_TOPIC_0000001233883261__li774961116317">If this parameter is disabled, querying the view returns <strong id="EN-US_TOPIC_0000001233883261__b523120337479">0</strong>.</li></ul>
|
|
</div></div>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001233883261__section157928258228"><h4 class="sectiontitle">enable_track_wait_event</h4><p id="EN-US_TOPIC_0000001233883261__p1780184819226"><strong id="EN-US_TOPIC_0000001233883261__b148743815">Parameter description</strong>: Specifies whether to collect statistics on waiting events, including the number of occurrence times, number of failures, duration, maximum waiting time, minimum waiting time, and average waiting time.</p>
|
|
<p id="EN-US_TOPIC_0000001233883261__p3817195510222"><strong id="EN-US_TOPIC_0000001233883261__b9852740163915">Type</strong>: SIGHUP</p>
|
|
<p id="EN-US_TOPIC_0000001233883261__p880184812223"><strong id="EN-US_TOPIC_0000001233883261__b3578245173912">Value range</strong>: Boolean</p>
|
|
<ul id="EN-US_TOPIC_0000001233883261__ul980104892210"><li id="EN-US_TOPIC_0000001233883261__li188054812218"><strong id="EN-US_TOPIC_0000001233883261__b1389778999">on</strong> indicates that the statistics collection function is enabled.</li><li id="EN-US_TOPIC_0000001233883261__li080164882210"><strong id="EN-US_TOPIC_0000001233883261__b1308854313">off</strong> indicates that the statistics collection function is disabled.</li></ul>
|
|
<p id="EN-US_TOPIC_0000001233883261__p1980174814227"><strong id="EN-US_TOPIC_0000001233883261__b91359516394">Default value</strong>: <strong id="EN-US_TOPIC_0000001233883261__b414225133916">off</strong></p>
|
|
<div class="note" id="EN-US_TOPIC_0000001233883261__note192121046112411"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="EN-US_TOPIC_0000001233883261__ul642461020253"><li id="EN-US_TOPIC_0000001233883261__li17424110182515">The <strong id="EN-US_TOPIC_0000001233883261__b12775174554511">enable_track_wait_event</strong> parameter is restricted by <strong id="EN-US_TOPIC_0000001233883261__b15172512453">track_activities</strong>. Its functions cannot take effect no matter whether it is enabled if <strong id="EN-US_TOPIC_0000001233883261__b16248115115467">track_activities</strong> is disabled.</li><li id="EN-US_TOPIC_0000001233883261__li124243109250">When <strong id="EN-US_TOPIC_0000001233883261__b2807245174812">track_activities</strong> or <strong id="EN-US_TOPIC_0000001233883261__b13462104844810">enable_track_wait_event</strong> is disabled, if you query the <strong id="EN-US_TOPIC_0000001233883261__b542151374911">get_instr_wait_event</strong> function, <strong id="EN-US_TOPIC_0000001233883261__b10256151944916">gs_wait_events</strong> view, or <strong id="EN-US_TOPIC_0000001233883261__b1037902210493">pgxc_wait_events</strong> view, a message is displayed indicating that the GUC parameter is disabled and the query result is 0.</li><li id="EN-US_TOPIC_0000001233883261__li114241110132513">If <strong id="EN-US_TOPIC_0000001233883261__b129101746104912">track_activities</strong> or <strong id="EN-US_TOPIC_0000001233883261__b53480497497">enable_track_wait_event</strong> is disabled during cluster running, <span id="EN-US_TOPIC_0000001233883261__text11931144813252">GaussDB(DWS)</span> will not collect statistics on waiting events. However, statistics that have been collected are not affected.</li></ul>
|
|
</div></div>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001233883261__section17472228162311"><h4 class="sectiontitle">enable_wdr_snapshot</h4><p id="EN-US_TOPIC_0000001233883261__p17472142811231"><strong id="EN-US_TOPIC_0000001233883261__b1014322918507">Parameter description</strong>: Specifies whether to enable the performance view snapshot function. After this function is enabled, <span id="EN-US_TOPIC_0000001233883261__text9661195772610">GaussDB(DWS)</span> will periodically create snapshots for some system performance views and save them permanently. In addition, it will accept manual snapshot creation requests.</p>
|
|
<p id="EN-US_TOPIC_0000001233883261__p64731828142315"><strong id="EN-US_TOPIC_0000001233883261__b84183436519">Type</strong>: SIGHUP</p>
|
|
<p id="EN-US_TOPIC_0000001233883261__p15473172842318"><strong id="EN-US_TOPIC_0000001233883261__b1574316544517">Value range</strong>: Boolean</p>
|
|
<ul id="EN-US_TOPIC_0000001233883261__ul17473162815237"><li id="EN-US_TOPIC_0000001233883261__li54731328102319"><strong id="EN-US_TOPIC_0000001233883261__b14590456185113">on</strong> indicates that the snapshot function is enabled.</li><li id="EN-US_TOPIC_0000001233883261__li13473928102319"><strong id="EN-US_TOPIC_0000001233883261__b193869215529">off</strong> indicates that the snapshot function is disabled.</li></ul>
|
|
<p id="EN-US_TOPIC_0000001233883261__p8473182822320"><strong id="EN-US_TOPIC_0000001233883261__b174893115010">Default value</strong>: <strong id="EN-US_TOPIC_0000001233883261__b07494315017">off</strong></p>
|
|
<div class="note" id="EN-US_TOPIC_0000001233883261__note1493162532617"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="EN-US_TOPIC_0000001233883261__ul177911932122611"><li id="EN-US_TOPIC_0000001233883261__li179173210266">If the <strong id="EN-US_TOPIC_0000001233883261__b17671311413">create_wdr_snapshot</strong> function is executed to manually create a view when the <strong id="EN-US_TOPIC_0000001233883261__b7851838405">enable_wdr_snapshot</strong> parameter is disabled, a message is displayed indicating that the GUC parameter is not enabled.</li><li id="EN-US_TOPIC_0000001233883261__li1479113325266">If the <strong id="EN-US_TOPIC_0000001233883261__b12711215220">enable_wdr_snapshot</strong> parameter is modified during the snapshot creation process, the snapshot that is being created is not affected. The modification takes effect when the snapshot is manually or periodically created next time.</li></ul>
|
|
</div></div>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001233883261__section794343418230"><h4 class="sectiontitle">wdr_snapshot_interval</h4><p id="EN-US_TOPIC_0000001233883261__p179431634162317"><strong id="EN-US_TOPIC_0000001233883261__b989412917210">Parameter description</strong>: Specifies the interval for automatically creating performance view snapshots.</p>
|
|
<p id="EN-US_TOPIC_0000001233883261__p139441934132316"><strong id="EN-US_TOPIC_0000001233883261__b1812019303310">Type</strong>: SIGHUP</p>
|
|
<p id="EN-US_TOPIC_0000001233883261__p129441334162318"><strong id="EN-US_TOPIC_0000001233883261__b16344145713311">Value range</strong>: an integer ranging from 10 to 180, in minutes</p>
|
|
<p id="EN-US_TOPIC_0000001233883261__p179443342234"><strong id="EN-US_TOPIC_0000001233883261__b109654376103">Default value</strong>: <strong id="EN-US_TOPIC_0000001233883261__b1852764121011">60</strong></p>
|
|
<div class="note" id="EN-US_TOPIC_0000001233883261__note6554112514288"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="EN-US_TOPIC_0000001233883261__ul545412321284"><li id="EN-US_TOPIC_0000001233883261__li245415321283">The value of this parameter must be set in accordance with the cluster load. You are advised to set this parameter to a value greater than the time required for creating a snapshot.</li><li id="EN-US_TOPIC_0000001233883261__li12455203232811">If the value of <strong id="EN-US_TOPIC_0000001233883261__b4328142014397">wdr_snapshot_interval</strong> is less than the time required for creating a snapshot, the system will skip this snapshot creation because it finds that the previous snapshot creation is not complete when the time for this automatic snapshot creation arrives.</li></ul>
|
|
</div></div>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001233883261__section362484119232"><h4 class="sectiontitle">wdr_snapshot_retention_days</h4><p id="EN-US_TOPIC_0000001233883261__p12624124112232"><strong id="EN-US_TOPIC_0000001233883261__b6893135614110">Parameter description</strong>: Specifies the maximum number of days for storing performance snapshot data.</p>
|
|
<p id="EN-US_TOPIC_0000001233883261__p46241841182312"><strong id="EN-US_TOPIC_0000001233883261__b1568711744210">Type</strong>: SIGHUP</p>
|
|
<p id="EN-US_TOPIC_0000001233883261__p1262412415231"><strong id="EN-US_TOPIC_0000001233883261__b1884095311525">Value range</strong>: an integer ranging from 1 to 15 days</p>
|
|
<p id="EN-US_TOPIC_0000001233883261__p1362518413234"><strong id="EN-US_TOPIC_0000001233883261__b1413578664144214">Default value</strong>: <strong id="EN-US_TOPIC_0000001233883261__b578690575144214">8</strong></p>
|
|
<div class="note" id="EN-US_TOPIC_0000001233883261__note145825253020"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="EN-US_TOPIC_0000001233883261__ul20372125912301"><li id="EN-US_TOPIC_0000001233883261__li1437219598305">If <strong id="EN-US_TOPIC_0000001233883261__b13111479425">enable_wdr_snapshot</strong> is enabled, snapshot data that has been stored for <strong id="EN-US_TOPIC_0000001233883261__b18666487489">wdr_snapshot_retention_days</strong> days will be automatically deleted.</li><li id="EN-US_TOPIC_0000001233883261__li10373659103010">The value of this parameter must be set in accordance with the available disk space. A larger value requires more disk space.</li><li id="EN-US_TOPIC_0000001233883261__li14373185916304">The modification of this parameter does not take effect immediately. The expired snapshot data will be cleared only when a snapshot is automatically created next time.</li></ul>
|
|
</div></div>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="dws_04_0919.html">Statistics During the Database Running</a></div>
|
|
</div>
|
|
</div>
|
|
|