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>
19 lines
2.3 KiB
HTML
19 lines
2.3 KiB
HTML
<a name="EN-US_TOPIC_0000001233761701"></a><a name="EN-US_TOPIC_0000001233761701"></a>
|
|
|
|
<h1 class="topictitle1">Case: Adjusting the Table Storage Mode in a Medium Table</h1>
|
|
<div id="body8662426"><p id="EN-US_TOPIC_0000001233761701__p6107145511444">In <span id="EN-US_TOPIC_0000001233761701__text1611164011">GaussDB(DWS)</span>, row-store tables use the row execution engine, and column-store tables use the column execution engine. If both row-store table and column-store tables exist in a SQL statement, the system will automatically select the row execution engine. The performance of a column execution engine (except for the indexscan related operators) is much better than that of a row execution engine. Therefore, a column-store table is recommended. This is important for some medium result set dumping tables, and you need to select a proper table storage type.</p>
|
|
<div class="section" id="EN-US_TOPIC_0000001233761701__s838e537f90e345f78061c1ff0fcf16e7"><h4 class="sectiontitle">Before Optimization</h4><p id="EN-US_TOPIC_0000001233761701__a6548708a44714e51ace16df066eae97b">During the test at a site, if the following execution plan is performed, the customer expects that the performance can be improved and the result can be returned within 3s.</p>
|
|
<p id="EN-US_TOPIC_0000001233761701__p3672195511239"><span><img id="EN-US_TOPIC_0000001233761701__image66712551233" src="figure/en-us_image_0000001188323768.jpg"></span></p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001233761701__s16c0090f3ac04156a437e0a9ba754ef5"><h4 class="sectiontitle">After Optimization</h4><p id="EN-US_TOPIC_0000001233761701__a54b2f6d2e69e4ebea03da8a7242661cf">It is found that the row engine is used after analysis, because both the temporary plan table input_acct_id_tbl and the medium result dumping table row_unlogged_table use a row-store table.</p>
|
|
<p id="EN-US_TOPIC_0000001233761701__abdeef7671bf340c88ebfdb165f86bd4f">After the two tables are changed into column-store tables, the system performance is improved and the result is returned by 1.6s.</p>
|
|
<p id="EN-US_TOPIC_0000001233761701__p15241191671811"><span><img id="EN-US_TOPIC_0000001233761701__image3227131781810" src="figure/en-us_image_0000001233883401.png"></span></p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="dws_04_0474.html">Optimization Cases</a></div>
|
|
</div>
|
|
</div>
|
|
|