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>
55 lines
12 KiB
HTML
55 lines
12 KiB
HTML
<a name="EN-US_TOPIC_0000001233708643"></a><a name="EN-US_TOPIC_0000001233708643"></a>
|
|
|
|
<h1 class="topictitle1">ALTER RESOURCE POOL</h1>
|
|
<div id="body8662426"><div class="section" id="EN-US_TOPIC_0000001233708643__se1c3f486ddc249bf88a6665ebb1755f8"><h4 class="sectiontitle">Function</h4><p id="EN-US_TOPIC_0000001233708643__a2252e8d6585640c2a961739f92bab925"><strong id="EN-US_TOPIC_0000001233708643__b225048348214826">ALTER RESOURCE POOL</strong> changes the Cgroup of a resource pool.</p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001233708643__s45e5bcb791ea44aea14d5f73d6f0f95c"><h4 class="sectiontitle">Precautions</h4><p id="EN-US_TOPIC_0000001233708643__ab968098694574d398abccd639f568bbf">Users having the ALTER permission can modify resource pools.</p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001233708643__sb962574e3aca4aa293b4b146573d5cda"><h4 class="sectiontitle">Syntax</h4><div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001233708643__s5d9fde3fca18406caf398a9d37601b16"><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">ALTER</span><span class="w"> </span><span class="n">RESOURCE</span><span class="w"> </span><span class="n">POOL</span><span class="w"> </span><span class="n">pool_name</span>
|
|
<span class="w"> </span><span class="k">WITH</span><span class="w"> </span><span class="p">(</span><span class="err">{</span><span class="n">MEM_PERCENT</span><span class="o">=</span><span class="w"> </span><span class="n">pct</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">CONTROL_GROUP</span><span class="o">=</span><span class="ss">"group_name"</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">ACTIVE_STATEMENTS</span><span class="o">=</span><span class="n">stmt</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">MAX_DOP</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">dop</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">MEMORY_LIMIT</span><span class="o">=</span><span class="s1">'memory_size'</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">io_limits</span><span class="o">=</span><span class="n">io_limits</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">io_priority</span><span class="o">=</span><span class="s1">'io_priority'</span><span class="err">}</span><span class="p">[,</span><span class="w"> </span><span class="p">...</span><span class="w"> </span><span class="p">]);</span>
|
|
</pre></div></td></tr></table></div>
|
|
|
|
</div>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001233708643__s9c19b6dafe4b4e2c8238e8930621ebe1"><h4 class="sectiontitle">Parameter Description</h4><ul id="EN-US_TOPIC_0000001233708643__uafca645403b546eb8d3dfba1d653b177"><li id="EN-US_TOPIC_0000001233708643__lfde7b0ce8c3c4a5db0f3b2fc758835d7"><strong id="EN-US_TOPIC_0000001233708643__acb76367ef13341529adb187c9aa0765b">pool_name</strong><p id="EN-US_TOPIC_0000001233708643__ad6abc158ac654e4695c2673e7abbb344">Specifies the name of the resource pool.</p>
|
|
<p id="EN-US_TOPIC_0000001233708643__a50176d53e01349cfb042dd9b63039fab">The name of the resource pool is the name of an existing resource pool.</p>
|
|
<p id="EN-US_TOPIC_0000001233708643__a57c751b7b8a14544aed1d4dc1b06da8d">Value range: a string. It must comply with the naming convention.</p>
|
|
</li><li id="EN-US_TOPIC_0000001233708643__l2c470ac321c04f80b92c477ac85e9a2f"><strong id="EN-US_TOPIC_0000001233708643__ac2fd9399c4164bf9a765d30c0db4f582">group_name</strong><p id="EN-US_TOPIC_0000001233708643__a66282ce0abb94e88917ed26a085c0a6c">Specifies the name of a Cgroup.</p>
|
|
<div class="note" id="EN-US_TOPIC_0000001233708643__n854e7ff13785477c96c823fb98fa88a5"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="EN-US_TOPIC_0000001233708643__ul163010165379"><li id="EN-US_TOPIC_0000001233708643__li06432111419">You can use either double quotation marks ("") or single quotation mark ('') in the syntax when setting the name of a Cgroup.</li><li id="EN-US_TOPIC_0000001233708643__l384b106dd30f4a719ae129a9e20500bc">The value of <strong id="EN-US_TOPIC_0000001233708643__b26641282012">group_name</strong> is case-sensitive.</li><li id="EN-US_TOPIC_0000001233708643__l3c430dc33ec648cea99924fd80ac1934">When <strong id="EN-US_TOPIC_0000001233708643__b84235270610637">group_name</strong> is not specified, the default value "Medium" is used. It is the "Medium" Timeshare Cgroup<p id="EN-US_TOPIC_0000001233708643__a05887f8aa5514cf988b16e5e693dc972">of the DefaultClass Cgroup.</p>
|
|
</li><li id="EN-US_TOPIC_0000001233708643__li34158216378">If a database user specifies the Timeshare string (<strong id="EN-US_TOPIC_0000001233708643__b35157415332">Rush</strong>, <strong id="EN-US_TOPIC_0000001233708643__b651594163316">High</strong>, <strong id="EN-US_TOPIC_0000001233708643__b5515104123310">Medium</strong>, or <strong id="EN-US_TOPIC_0000001233708643__b1751534163317">Low</strong>) in the syntax, for example, if <strong id="EN-US_TOPIC_0000001233708643__b451584173318">control_group</strong> is set to <strong id="EN-US_TOPIC_0000001233708643__b55154413337">High</strong>, the resource pool will be associated with the <strong id="EN-US_TOPIC_0000001233708643__b5515249332">High</strong> Timeshare Cgroup under <strong id="EN-US_TOPIC_0000001233708643__b351513443317">DefaultClass</strong>.</li></ul>
|
|
</div></div>
|
|
<p id="EN-US_TOPIC_0000001233708643__acbd3b1d208bb483e8b5ed317932a8f19">Value range: an existing control group.</p>
|
|
</li><li id="EN-US_TOPIC_0000001233708643__l65cca0aebb20421b802c489e96910fd0"><strong id="EN-US_TOPIC_0000001233708643__afc58f2529b33484e90638ca3813bc0db">stmt</strong><p id="EN-US_TOPIC_0000001233708643__abd31cf7029a44d348f8883f0141a16a7">Specifies the maximum number of statements that can be concurrently executed in a resource pool.</p>
|
|
<p id="EN-US_TOPIC_0000001233708643__af358215b6fdf46f5ada45bc0f15b844f">Value range: Numeric data ranging from <strong id="EN-US_TOPIC_0000001233708643__b8423527061107">-1</strong> to <strong id="EN-US_TOPIC_0000001233708643__b84235270611014">INT_MAX</strong>.</p>
|
|
</li><li id="EN-US_TOPIC_0000001233708643__lfa7f72d69265463b892b44ec1584902c"><strong id="EN-US_TOPIC_0000001233708643__ac875fd4e84a34153aa8d78b9ad936738">dop</strong><p id="EN-US_TOPIC_0000001233708643__a855815071ce9482a9b571eaa0b62e55d"> This is a reserved parameter.</p>
|
|
<p id="EN-US_TOPIC_0000001233708643__ac7accc73617e4d09838c7e11aac86c19">Value range: Numeric data ranging from <strong id="EN-US_TOPIC_0000001233708643__en-us_topic_0085031664_en-us_topic_0058966010_b8423527061107">-1</strong> to <strong id="EN-US_TOPIC_0000001233708643__en-us_topic_0085031664_en-us_topic_0058966010_b84235270611014">INT_MAX</strong>.</p>
|
|
</li><li id="EN-US_TOPIC_0000001233708643__lce5414ffcbeb4bd39c091bef6be29d7d"><strong id="EN-US_TOPIC_0000001233708643__a45a572b6513a46cb8b2d57a189959d3d">memory_size</strong><p id="EN-US_TOPIC_0000001233708643__a3626f8b4cd054a41b0d1979797e05151">Specifies the maximum storage for a resource pool.</p>
|
|
<p id="EN-US_TOPIC_0000001233708643__ad72204eec616495d9fac8617e9078a6f">Value range: a string, from <strong id="EN-US_TOPIC_0000001233708643__en-us_topic_0085031664_en-us_topic_0058966010_b84235270619652">1KB</strong> to <strong id="EN-US_TOPIC_0000001233708643__en-us_topic_0085031664_en-us_topic_0058966010_b84235270619655">2047GB</strong>.</p>
|
|
</li><li id="EN-US_TOPIC_0000001233708643__lb51e049bcced47b2b2bb2a1acf784ed3"><strong id="EN-US_TOPIC_0000001233708643__a014f23487f9141898c57feb4a9f6a1ad">mem_percent</strong><p id="EN-US_TOPIC_0000001233708643__afe86fd9bbd6346b5bd40cd4ede3ea561">Specifies the proportion of available resource pool memory to the total memory or group user memory.</p>
|
|
<p id="EN-US_TOPIC_0000001233708643__aecabb0647da240ac951c8b643d8dc098">The value of <strong id="EN-US_TOPIC_0000001233708643__en-us_topic_0085031664_b842352706113345">mem_percent</strong> for a common user is an integer ranging from 0 to 100. The default value is <strong id="EN-US_TOPIC_0000001233708643__en-us_topic_0085031664_b842352706113359">0</strong>.</p>
|
|
</li><li id="EN-US_TOPIC_0000001233708643__li45028228402"><strong id="EN-US_TOPIC_0000001233708643__b1097215485411">io_limits</strong><p id="EN-US_TOPIC_0000001233708643__p8322143417103">This parameter has been discarded in 8.1.2 and is reserved for compatibility with earlier versions.</p>
|
|
</li><li id="EN-US_TOPIC_0000001233708643__li128883004311"><strong id="EN-US_TOPIC_0000001233708643__b72702043134311">io_priority</strong><p id="EN-US_TOPIC_0000001233708643__p113574654310">This parameter has been discarded in 8.1.2 and is reserved for compatibility with earlier versions.</p>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001233708643__sf1c0a555c4e442309929e318256fed6f"><h4 class="sectiontitle">Examples</h4><p id="EN-US_TOPIC_0000001233708643__p464112713123">Create an example resource pool <strong id="EN-US_TOPIC_0000001233708643__b849911496197">pool_test</strong>, whose Cgroup is <strong id="EN-US_TOPIC_0000001233708643__b192521418199">Medium Timeshare Workload</strong> under <strong id="EN-US_TOPIC_0000001233708643__b1933515441192">DefaultClass</strong>.</p>
|
|
<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001233708643__screen15525337131418"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div><pre><span></span><span class="k">CREATE</span><span class="w"> </span><span class="n">RESOURCE</span><span class="w"> </span><span class="n">POOL</span><span class="w"> </span><span class="n">pool_test</span><span class="p">;</span>
|
|
</pre></div></td></tr></table></div>
|
|
|
|
</div>
|
|
<p id="EN-US_TOPIC_0000001233708643__p1298634519212">Specify <strong id="EN-US_TOPIC_0000001233708643__b14878111514281">High Timeshare Workload</strong> under <strong id="EN-US_TOPIC_0000001233708643__b145931525202812">DefaultClass</strong> as the Cgroup for the resource pool <strong id="EN-US_TOPIC_0000001233708643__b4704250142811">pool_test</strong>.</p>
|
|
<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001233708643__s995af167e342447c8f4f441a48d73bcf"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div><pre><span></span><span class="k">ALTER</span><span class="w"> </span><span class="n">RESOURCE</span><span class="w"> </span><span class="n">POOL</span><span class="w"> </span><span class="n">pool_test</span><span class="w"> </span><span class="k">WITH</span><span class="w"> </span><span class="p">(</span><span class="n">CONTROL_GROUP</span><span class="o">=</span><span class="ss">"High"</span><span class="p">);</span>
|
|
</pre></div></td></tr></table></div>
|
|
|
|
</div>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001233708643__sdcd88b1f797f43ffa7194d944f740043"><h4 class="sectiontitle">Helpful Links</h4><p id="EN-US_TOPIC_0000001233708643__a5b8f2bb10d5e462384dc9dae11930872"><a href="dws_06_0171.html">CREATE RESOURCE POOL</a>, <a href="dws_06_0202.html">DROP RESOURCE POOL</a></p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="dws_06_0118.html">DDL Syntax</a></div>
|
|
</div>
|
|
</div>
|
|
|