forked from docs/doc-exports
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com> Co-authored-by: Lu, Huayi <luhuayi@huawei.com> Co-committed-by: Lu, Huayi <luhuayi@huawei.com>
43 lines
9.1 KiB
HTML
43 lines
9.1 KiB
HTML
<a name="EN-US_TOPIC_0000001145694789"></a><a name="EN-US_TOPIC_0000001145694789"></a>
|
||
|
||
<h1 class="topictitle1">Statement Disk Space Control</h1>
|
||
<div id="body8662426"><p id="EN-US_TOPIC_0000001145694789__en-us_topic_0059778485_p765354514118">This section describes parameters related to statement disk space control, which are used to limit the disk space usage of statements.</p>
|
||
<div class="section" id="EN-US_TOPIC_0000001145694789__section96522431611"><h4 class="sectiontitle">sql_use_spacelimit</h4><p id="EN-US_TOPIC_0000001145694789__p2686151810715"><strong id="EN-US_TOPIC_0000001145694789__b847791764817">Parameter description</strong>: Specifies the space size for files to be spilled to disks when a single SQL statement is executed on a single DN. The managed space includes the space occupied by ordinary tables, temporary tables, and intermediate result sets to be flushed to disks. System administrators are also restricted by this parameter.</p>
|
||
<p id="EN-US_TOPIC_0000001145694789__p1518316391091"><strong id="EN-US_TOPIC_0000001145694789__b154371356124512">Type</strong>: USERSET</p>
|
||
<p id="EN-US_TOPIC_0000001145694789__p7414164761018"><strong id="EN-US_TOPIC_0000001145694789__b1343249486">Value range</strong>: an integer ranging from -1 to INT_MAX. The unit is KB. <strong id="EN-US_TOPIC_0000001145694789__b163601014122818">–1</strong> indicates no limit.</p>
|
||
<p id="EN-US_TOPIC_0000001145694789__p941544711019"><strong id="EN-US_TOPIC_0000001145694789__b1254752973419">Default value</strong>: <strong id="EN-US_TOPIC_0000001145694789__b6548162917346">–1</strong></p>
|
||
<p id="EN-US_TOPIC_0000001145694789__p208861529518"><strong id="EN-US_TOPIC_0000001145694789__b069519580563">Setting suggestion</strong>: You are advised to set <strong id="EN-US_TOPIC_0000001145694789__b1832717141577">sql_use_spacelimit</strong> to 10% of the total disk space where DNs reside. If two DNs exist on a single disk, set <strong id="EN-US_TOPIC_0000001145694789__b1784912573">sql_use_spacelimit</strong> to 5% of the total disk space.</p>
|
||
<div class="note" id="EN-US_TOPIC_0000001145694789__note72681330123513"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="EN-US_TOPIC_0000001145694789__p03551937173518">For example, if <strong id="EN-US_TOPIC_0000001145694789__b16984162134817">sql_use_spacelimit</strong> is set to <strong id="EN-US_TOPIC_0000001145694789__b18985162119483">100</strong> in the statement and the amount data spilled to disks on a single DN exceeds 100 KB, DWS stops the query and displays a message of threshold exceeding.</p>
|
||
<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001145694789__screen16546133551618"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
|
||
<span class="normal">2</span></pre></div></td><td class="code"><div><pre><span></span><span class="k">insert</span><span class="w"> </span><span class="k">into</span><span class="w"> </span><span class="n">user1</span><span class="p">.</span><span class="n">t1</span><span class="w"> </span><span class="k">select</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="k">from</span><span class="w"> </span><span class="n">user2</span><span class="p">.</span><span class="n">t1</span><span class="p">;</span><span class="w"></span>
|
||
<span class="n">ERROR</span><span class="p">:</span><span class="w"> </span><span class="n">The</span><span class="w"> </span><span class="k">space</span><span class="w"> </span><span class="n">used</span><span class="w"> </span><span class="k">on</span><span class="w"> </span><span class="n">DN</span><span class="w"> </span><span class="p">(</span><span class="mi">104</span><span class="w"> </span><span class="n">kB</span><span class="p">)</span><span class="w"> </span><span class="n">has</span><span class="w"> </span><span class="n">exceeded</span><span class="w"> </span><span class="n">the</span><span class="w"> </span><span class="k">sql</span><span class="w"> </span><span class="n">use</span><span class="w"> </span><span class="k">space</span><span class="w"> </span><span class="k">limit</span><span class="w"> </span><span class="p">(</span><span class="mi">100</span><span class="w"> </span><span class="n">kB</span><span class="p">).</span><span class="w"></span>
|
||
</pre></div></td></tr></table></div>
|
||
|
||
</div>
|
||
<p id="EN-US_TOPIC_0000001145694789__p39691145171714">Handling suggestion:</p>
|
||
<ul id="EN-US_TOPIC_0000001145694789__ul21123621820"><li id="EN-US_TOPIC_0000001145694789__li17112163186">Optimize the statement to reduce the data spilled to disks. </li><li id="EN-US_TOPIC_0000001145694789__li121129611815">If the disk space is sufficient, increase the value of this parameter.</li></ul>
|
||
</div></div>
|
||
</div>
|
||
<div class="section" id="EN-US_TOPIC_0000001145694789__s4c0c451fb0ee406d8eb0fbb9f3cd3200"><h4 class="sectiontitle">temp_file_limit</h4><p id="EN-US_TOPIC_0000001145694789__aca5571d47798431f9f9eb3883904a023"><strong id="EN-US_TOPIC_0000001145694789__b12779175354818">Parameter description</strong>: Specifies the total space for files spilled to disks in a single thread. For example, temporary files used by sorting and hash tables or cursors are controlled by this parameter.</p>
|
||
<p id="EN-US_TOPIC_0000001145694789__ae475a85a72c24dd7ac39150abf15d31f">This is a session-level setting.</p>
|
||
<p id="EN-US_TOPIC_0000001145694789__p1366511111425"><strong id="EN-US_TOPIC_0000001145694789__b11105135712454">Type</strong>: SUSET</p>
|
||
<p id="EN-US_TOPIC_0000001145694789__ab312c5a5f6e84309823c194e88f50569"><strong id="EN-US_TOPIC_0000001145694789__b26071931482">Value range</strong>: an integer ranging from -1 to INT_MAX. The unit is KB. <strong id="EN-US_TOPIC_0000001145694789__b1862913622">–1</strong> indicates no limit.</p>
|
||
<p id="EN-US_TOPIC_0000001145694789__a2bed2fbcca1140909447a8a957507bd1"><strong id="EN-US_TOPIC_0000001145694789__b53628433514291">Default value</strong>: <strong id="EN-US_TOPIC_0000001145694789__b164450946414291">–1</strong></p>
|
||
<div class="notice" id="EN-US_TOPIC_0000001145694789__nf08c20d4c8c3407f9aa6df0b9b7f8416"><span class="noticetitle"><img src="public_sys-resources/notice_3.0-en-us.png"> </span><div class="noticebody"><p id="EN-US_TOPIC_0000001145694789__a70d394806cb2410680db14c721d93944">This parameter does not apply to disk space occupied by temporary tablespaces used for executing SQL queries.</p>
|
||
</div></div>
|
||
</div>
|
||
<div class="section" id="EN-US_TOPIC_0000001145694789__section72361353101011"><h4 class="sectiontitle">bi_page_reuse_factor</h4><p id="EN-US_TOPIC_0000001145694789__p144111326121110"><strong id="EN-US_TOPIC_0000001145694789__b547143916183">Parameter description</strong>: Specifies the percentage of idle space of old pages that can be reused when page replication is used for data synchronization between primary and standby DNs in the scenario where data is inserted into row-store tables in batches.</p>
|
||
<p id="EN-US_TOPIC_0000001145694789__p1679420371218"><strong id="EN-US_TOPIC_0000001145694789__b1810416406204">Type</strong>: USERSET</p>
|
||
<p id="EN-US_TOPIC_0000001145694789__p13368182510128"><strong id="EN-US_TOPIC_0000001145694789__b256119490207">Value range</strong>: an integer ranging from 0 to 100. The value is a percentage. Value <strong id="EN-US_TOPIC_0000001145694789__b982361183813">0</strong> indicates that the old pages are not reused and new pages are requested.</p>
|
||
<p id="EN-US_TOPIC_0000001145694789__p1740433491219"><strong id="EN-US_TOPIC_0000001145694789__b132142011375">Default value</strong>: <strong id="EN-US_TOPIC_0000001145694789__b1890624816389">70</strong></p>
|
||
<div class="notice" id="EN-US_TOPIC_0000001145694789__note41321944131214"><span class="noticetitle"><img src="public_sys-resources/notice_3.0-en-us.png"> </span><div class="noticebody"><ul id="EN-US_TOPIC_0000001145694789__ul12271156101512"><li id="EN-US_TOPIC_0000001145694789__li747265513446">In an upgrade, the default value of this parameter is the same as that in the cluster before the upgrade. In a newly installed 8.1.1.500 cluster, the default value of this parameter is <strong id="EN-US_TOPIC_0000001145694789__b1947101116506">0</strong>.</li><li id="EN-US_TOPIC_0000001145694789__li12271205641517">You are not advised to set this parameter to a value less than <strong id="EN-US_TOPIC_0000001145694789__b119778113913">50</strong> (except <strong id="EN-US_TOPIC_0000001145694789__b06341953396">0</strong>). If the idle space of the reused page is small, too much old page data will be transmitted between the primary and standby DNs. As a result, the batch insertion performance deteriorates.</li><li id="EN-US_TOPIC_0000001145694789__li11027018166">You are not advised to set this parameter to a value greater than <strong id="EN-US_TOPIC_0000001145694789__b976344314399">90</strong>. If this parameter is set to a value greater than <strong id="EN-US_TOPIC_0000001145694789__b917033124120">90</strong>, idle pages will be frequently queried, but old pages cannot be reused.</li></ul>
|
||
</div></div>
|
||
</div>
|
||
</div>
|
||
<div>
|
||
<div class="familylinks">
|
||
<div class="parentlink"><strong>Parent topic:</strong> <a href="dws_04_0892.html">Resource Consumption</a></div>
|
||
</div>
|
||
</div>
|
||
|