doc-exports/docs/dws/dev/dws_04_0484.html
Lu, Huayi a24ca60074 DWS DEVELOPER 811 version
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>
2023-01-19 13:37:49 +00:00

19 lines
1.9 KiB
HTML

<a name="EN-US_TOPIC_0000001098655036"></a><a name="EN-US_TOPIC_0000001098655036"></a>
<h1 class="topictitle1">Case: Reconstructing Partition Tables</h1>
<div id="body8662426"><div class="section" id="EN-US_TOPIC_0000001098655036__s704c846564d342f9b26a809a18d6c3b0"><h4 class="sectiontitle">Symptom</h4><p id="EN-US_TOPIC_0000001098655036__aa389ac7621c74724a4286488db86730f">In the following simple SQL statements, the performance bottlenecks exist in the scan operation of dwcjk.</p>
<p id="EN-US_TOPIC_0000001098655036__p35061265214"><span><img id="EN-US_TOPIC_0000001098655036__image144321527132113" src="figure/en-us_image_0000001098655366.png"></span></p>
<p id="EN-US_TOPIC_0000001098655036__p207931646142118"><span><img id="EN-US_TOPIC_0000001098655036__image68431747152118" src="figure/en-us_image_0000001099135172.png"></span></p>
</div>
<div class="section" id="EN-US_TOPIC_0000001098655036__sc78474f98c4545cebed65e9a997b1007"><h4 class="sectiontitle">Optimization Analysis</h4><p id="EN-US_TOPIC_0000001098655036__a0eae1bbb4e824b848ea24081d7b4a6eb">Obviously, there are date features in the cjrq field of table data in the service layer, and this meet the features of a partitioned table. Replan the table definition of the dwcjk table. Set the cjrq field as a partition key, and day as an interval unit. Define the partitioned table dwcjk_part. The modified result is as follows, and the performance is nearly doubled.</p>
<p id="EN-US_TOPIC_0000001098655036__p19149195515229"><span><img id="EN-US_TOPIC_0000001098655036__image13660855182216" src="figure/en-us_image_0000001145495195.png"></span></p>
<p id="EN-US_TOPIC_0000001098655036__p1197416718232"><span><img id="EN-US_TOPIC_0000001098655036__image758172511235" src="figure/en-us_image_0000001098815188.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>