Yang, Tong 48706b7552 MRS COMP-LTS 320-lts.1 version
Reviewed-by: Kacur, Michal <michal.kacur@t-systems.com>
Co-authored-by: Yang, Tong <yangtong2@huawei.com>
Co-committed-by: Yang, Tong <yangtong2@huawei.com>
2024-04-12 12:51:10 +00:00

119 lines
16 KiB
HTML

<a name="mrs_01_24776"></a><a name="mrs_01_24776"></a>
<h1 class="topictitle1">Configuring Recommendation of Materialized Views</h1>
<div id="body32001227"><div class="section" id="mrs_01_24776__en-us_topic_0000001521080921_section9753111417"><h4 class="sectiontitle">Scenario</h4><p id="mrs_01_24776__en-us_topic_0000001521080921_p2413163012277"><span id="mrs_01_24776__en-us_topic_0000001521080921_text102002617558">HetuEngine</span> QAS module provides automatic detection, learning, and diagnosis of historical SQL execution records. After the materialized view recommendation function is enabled, the system can automatically learn and recommend the most valuable materialized view SQL statements, enabling <span id="mrs_01_24776__en-us_topic_0000001521080921_text15839485237">HetuEngine</span> to have the automatic precomputation acceleration capability. In related scenarios, the online query efficiency is improved by multiple times, and the system load pressure is effectively reduced.</p>
</div>
<div class="section" id="mrs_01_24776__en-us_topic_0000001521080921_section132193223149"><h4 class="sectiontitle">Prerequisites</h4><ul id="mrs_01_24776__en-us_topic_0000001521080921_ul76071022173513"><li id="mrs_01_24776__en-us_topic_0000001521080921_li164405414610">The cluster is running properly and at least one QAS instance has been installed.</li><li id="mrs_01_24776__en-us_topic_0000001521080921_li12608132214357">You have created a user for accessing the <span id="mrs_01_24776__en-us_topic_0000001521080921_text6140253894">HetuEngine</span> web UI, for example, <strong id="mrs_01_24776__en-us_topic_0000001521080921_b159718597918">Hetu_user</strong>. For details, see <a href="mrs_01_1714.html">Creating a HetuEngine User</a>.</li></ul>
</div>
<div class="section" id="mrs_01_24776__en-us_topic_0000001521080921_section109434212018"><a name="mrs_01_24776__en-us_topic_0000001521080921_section109434212018"></a><a name="en-us_topic_0000001521080921_section109434212018"></a><h4 class="sectiontitle">Enabling Materialized View Recommendation</h4><ol id="mrs_01_24776__en-us_topic_0000001521080921_ol132151037112819"><li id="mrs_01_24776__en-us_topic_0000001521080921_li42156373288"><span>Log in to FusionInsight Manager as user <strong id="mrs_01_24776__en-us_topic_0000001521080921_b17517193414117">Hetu_user</strong>.</span></li><li id="mrs_01_24776__en-us_topic_0000001521080921_li1021583782818"><span>Choose <strong id="mrs_01_24776__en-us_topic_0000001521080921_b118804381484">Cluster</strong> &gt; <strong id="mrs_01_24776__en-us_topic_0000001521080921_b13880173814817">Services</strong> &gt; <strong id="mrs_01_24776__en-us_topic_0000001521080921_b788013389812"><span id="mrs_01_24776__en-us_topic_0000001521080921_text98812386815">HetuEngine</span></strong> and then choose <strong id="mrs_01_24776__en-us_topic_0000001521080921_b9881123812814">Configurations</strong> &gt; <strong id="mrs_01_24776__en-us_topic_0000001521080921_b488116381587">All Configurations</strong>. In the navigation tree, choose <strong id="mrs_01_24776__en-us_topic_0000001521080921_b1088115381582">QAS(Role)</strong> &gt; <strong id="mrs_01_24776__en-us_topic_0000001521080921_b11881238488">Materialized View Recommendation</strong>. Set materialized view recommendation parameters by referring to <a href="#mrs_01_24776__en-us_topic_0000001521080921_table49551729155011">Table 1</a> and retain the default values for other parameters.</span><p>
<div class="tablenoborder"><a name="mrs_01_24776__en-us_topic_0000001521080921_table49551729155011"></a><a name="en-us_topic_0000001521080921_table49551729155011"></a><table cellpadding="4" cellspacing="0" summary="" id="mrs_01_24776__en-us_topic_0000001521080921_table49551729155011" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Materialized view recommendation parameters</caption><thead align="left"><tr id="mrs_01_24776__en-us_topic_0000001521080921_row1695692916503"><th align="left" class="cellrowborder" valign="top" width="33.333333333333336%" id="mcps1.3.3.2.2.2.1.2.4.1.1"><p id="mrs_01_24776__en-us_topic_0000001521080921_p59561329185011">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="17.751775177517754%" id="mcps1.3.3.2.2.2.1.2.4.1.2"><p id="mrs_01_24776__en-us_topic_0000001521080921_p49561929105018">Example Value</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="48.914891489148914%" id="mcps1.3.3.2.2.2.1.2.4.1.3"><p id="mrs_01_24776__en-us_topic_0000001521080921_p49561029175010">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="mrs_01_24776__en-us_topic_0000001521080921_row695616293502"><td class="cellrowborder" valign="top" width="33.333333333333336%" headers="mcps1.3.3.2.2.2.1.2.4.1.1 "><p id="mrs_01_24776__en-us_topic_0000001521080921_p6956132995014">qas.enable.auto.recommendation</p>
</td>
<td class="cellrowborder" valign="top" width="17.751775177517754%" headers="mcps1.3.3.2.2.2.1.2.4.1.2 "><p id="mrs_01_24776__en-us_topic_0000001521080921_p1995612919505">true</p>
</td>
<td class="cellrowborder" valign="top" width="48.914891489148914%" headers="mcps1.3.3.2.2.2.1.2.4.1.3 "><p id="mrs_01_24776__en-us_topic_0000001521080921_p795652918509">Whether to enable materialized view recommendation. The default value is <strong id="mrs_01_24776__en-us_topic_0000001521080921_b334611912100">false</strong>.</p>
</td>
</tr>
<tr id="mrs_01_24776__en-us_topic_0000001521080921_row1995616294503"><td class="cellrowborder" valign="top" width="33.333333333333336%" headers="mcps1.3.3.2.2.2.1.2.4.1.1 "><p id="mrs_01_24776__en-us_topic_0000001521080921_p169568299504">qas.sql.submitter</p>
</td>
<td class="cellrowborder" valign="top" width="17.751775177517754%" headers="mcps1.3.3.2.2.2.1.2.4.1.2 "><p id="mrs_01_24776__en-us_topic_0000001521080921_p199563294508">default,zuhu1</p>
</td>
<td class="cellrowborder" valign="top" width="48.914891489148914%" headers="mcps1.3.3.2.2.2.1.2.4.1.3 "><p id="mrs_01_24776__en-us_topic_0000001521080921_p3956122975011">Name of the tenant for which the materialized view recommendation function is enabled. Use commas (,) to separate multiple tenants.</p>
</td>
</tr>
<tr id="mrs_01_24776__en-us_topic_0000001521080921_row395622915020"><td class="cellrowborder" valign="top" width="33.333333333333336%" headers="mcps1.3.3.2.2.2.1.2.4.1.1 "><p id="mrs_01_24776__en-us_topic_0000001521080921_p8731432124620">qas.schedule.fixed.delay</p>
</td>
<td class="cellrowborder" valign="top" width="17.751775177517754%" headers="mcps1.3.3.2.2.2.1.2.4.1.2 "><p id="mrs_01_24776__en-us_topic_0000001521080921_p1795622975018">1d</p>
</td>
<td class="cellrowborder" valign="top" width="48.914891489148914%" headers="mcps1.3.3.2.2.2.1.2.4.1.3 "><p id="mrs_01_24776__en-us_topic_0000001521080921_p13956132995016">Interval for recommending materialized views. Once a day is recommended.</p>
</td>
</tr>
<tr id="mrs_01_24776__en-us_topic_0000001521080921_row1995616296509"><td class="cellrowborder" valign="top" width="33.333333333333336%" headers="mcps1.3.3.2.2.2.1.2.4.1.1 "><p id="mrs_01_24776__en-us_topic_0000001521080921_p10989189134518">qas.threshold.for.mv.recommend</p>
</td>
<td class="cellrowborder" valign="top" width="17.751775177517754%" headers="mcps1.3.3.2.2.2.1.2.4.1.2 "><p id="mrs_01_24776__en-us_topic_0000001521080921_p6956129195016">0.05</p>
</td>
<td class="cellrowborder" valign="top" width="48.914891489148914%" headers="mcps1.3.3.2.2.2.1.2.4.1.3 "><p id="mrs_01_24776__en-us_topic_0000001521080921_p39561229145019">Filtering threshold of materialized view recommendation. The value ranges from <strong id="mrs_01_24776__en-us_topic_0000001521080921_b109991145131314">0.001</strong> to <strong id="mrs_01_24776__en-us_topic_0000001521080921_b12670847111313">1</strong>. You are advised to adjust the value based on the site requirements.</p>
</td>
</tr>
</tbody>
</table>
</div>
</p></li><li id="mrs_01_24776__en-us_topic_0000001521080921_li521653782820"><span>Click <span class="uicontrol" id="mrs_01_24776__en-us_topic_0000001521080921_uicontrol1489925116135"><b>Save</b></span>.</span></li><li id="mrs_01_24776__en-us_topic_0000001521080921_li4216203711282"><span>Click <strong id="mrs_01_24776__en-us_topic_0000001521080921_b92981556101318">Instance</strong>, select all QAS instances, click <strong id="mrs_01_24776__en-us_topic_0000001521080921_b3298195620133">More</strong>, and select <strong id="mrs_01_24776__en-us_topic_0000001521080921_b1029975620133">Restart Instance</strong>. In the displayed dialog box, enter the password to restart all QAS instances for the parameters to take effect.</span></li></ol>
</div>
<div class="section" id="mrs_01_24776__en-us_topic_0000001521080921_section051233712276"><a name="mrs_01_24776__en-us_topic_0000001521080921_section051233712276"></a><a name="en-us_topic_0000001521080921_section051233712276"></a><h4 class="sectiontitle">Viewing Materialized View Recommendation Results</h4><ol id="mrs_01_24776__en-us_topic_0000001521080921_ol417754117287"><li id="mrs_01_24776__en-us_topic_0000001521080921_li1217784122814"><span>Log in to FusionInsight Manager as user <strong id="mrs_01_24776__en-us_topic_0000001521080921_b1055664876">Hetu_user</strong>.</span></li><li id="mrs_01_24776__en-us_topic_0000001521080921_li14177241152817"><span>Choose <strong id="mrs_01_24776__en-us_topic_0000001521080921_b1467816449570">Cluster</strong> &gt; <strong id="mrs_01_24776__en-us_topic_0000001521080921_b8679184425713">Services</strong> &gt; <strong id="mrs_01_24776__en-us_topic_0000001521080921_b6680174495717"><span id="mrs_01_24776__en-us_topic_0000001521080921_text11182231486">HetuEngine</span></strong> to go its service page.</span></li><li id="mrs_01_24776__en-us_topic_0000001521080921_li1177124113280"><span>In the <strong id="mrs_01_24776__en-us_topic_0000001521080921_b38183106352">Basic Information</strong> area on the <strong id="mrs_01_24776__en-us_topic_0000001521080921_b8819710143510">Dashboard</strong> page, click the link next to <strong id="mrs_01_24776__en-us_topic_0000001521080921_b108192100355">HSConsole WebUI</strong>. The HSConsole page is displayed.</span></li><li id="mrs_01_24776__en-us_topic_0000001521080921_li1017704132815"><span>Choose <strong id="mrs_01_24776__en-us_topic_0000001521080921_b2353131714355">SQL O&amp;M</strong> &gt; <strong id="mrs_01_24776__en-us_topic_0000001521080921_b18354171713519">Automatic MV Recommendation</strong>. You can search for materialized views by tenant, status, recommendation period, and materialized view name. Fuzzy search is supported. You can export the recommendation result of a specified materialized view.</span><p><div class="p" id="mrs_01_24776__en-us_topic_0000001521080921_p13131052202710">The status of a materialized view task can be:
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="mrs_01_24776__en-us_topic_0000001521080921_table12524121973320" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Status of a materialized view task</caption><thead align="left"><tr id="mrs_01_24776__en-us_topic_0000001521080921_row952518194335"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.2.4.2.1.1.2.5.1.1"><p id="mrs_01_24776__en-us_topic_0000001521080921_p16525121912333">Status Name</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.2.4.2.1.1.2.5.1.2"><p id="mrs_01_24776__en-us_topic_0000001521080921_p85251119183312">Description</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.2.4.2.1.1.2.5.1.3"><p id="mrs_01_24776__en-us_topic_0000001521080921_p63844917342">Status Name</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.2.4.2.1.1.2.5.1.4"><p id="mrs_01_24776__en-us_topic_0000001521080921_p83841094341">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="mrs_01_24776__en-us_topic_0000001521080921_row052531983319"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.4.2.1.1.2.5.1.1 "><p id="mrs_01_24776__en-us_topic_0000001521080921_p85251419103317">To Be Created</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.4.2.1.1.2.5.1.2 "><p id="mrs_01_24776__en-us_topic_0000001521080921_p12525171943315">To be created</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.4.2.1.1.2.5.1.3 "><p id="mrs_01_24776__en-us_topic_0000001521080921_p19525019143319">Deleting</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.4.2.1.1.2.5.1.4 "><p id="mrs_01_24776__en-us_topic_0000001521080921_p7525719103311">Terminating</p>
</td>
</tr>
<tr id="mrs_01_24776__en-us_topic_0000001521080921_row0525619143317"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.4.2.1.1.2.5.1.1 "><p id="mrs_01_24776__en-us_topic_0000001521080921_p12525131913339">Creating</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.4.2.1.1.2.5.1.2 "><p id="mrs_01_24776__en-us_topic_0000001521080921_p652541983318">Creating</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.4.2.1.1.2.5.1.3 "><p id="mrs_01_24776__en-us_topic_0000001521080921_p1552561983320">Deleted</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.4.2.1.1.2.5.1.4 "><p id="mrs_01_24776__en-us_topic_0000001521080921_p1652517194339">Terminated</p>
</td>
</tr>
<tr id="mrs_01_24776__en-us_topic_0000001521080921_row16526619163310"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.4.2.1.1.2.5.1.1 "><p id="mrs_01_24776__en-us_topic_0000001521080921_p9526111953317">Created</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.4.2.1.1.2.5.1.2 "><p id="mrs_01_24776__en-us_topic_0000001521080921_p25263199337">Created</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.4.2.1.1.2.5.1.3 "><p id="mrs_01_24776__en-us_topic_0000001521080921_p5526201913335">Planning</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.4.2.1.1.2.5.1.4 "><p id="mrs_01_24776__en-us_topic_0000001521080921_p6526101911335">Being planned</p>
</td>
</tr>
<tr id="mrs_01_24776__en-us_topic_0000001521080921_row1552651943314"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.4.2.1.1.2.5.1.1 "><p id="mrs_01_24776__en-us_topic_0000001521080921_p1652671993316">Failed</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.4.2.1.1.2.5.1.2 "><p id="mrs_01_24776__en-us_topic_0000001521080921_p1652651917332">Creation failed</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.4.2.1.1.2.5.1.3 "><p id="mrs_01_24776__en-us_topic_0000001521080921_p7526191903315">Aborted</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.4.2.1.1.2.5.1.4 "><p id="mrs_01_24776__en-us_topic_0000001521080921_p1252661993310">Aborted</p>
</td>
</tr>
<tr id="mrs_01_24776__en-us_topic_0000001521080921_row327492918337"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.4.2.1.1.2.5.1.1 "><p id="mrs_01_24776__en-us_topic_0000001521080921_p1227619291336">Updating</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.4.2.1.1.2.5.1.2 "><p id="mrs_01_24776__en-us_topic_0000001521080921_p22768291335">Updating</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.4.2.1.1.2.5.1.3 "><p id="mrs_01_24776__en-us_topic_0000001521080921_p10276102913317">Duplicated</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.4.2.1.1.2.5.1.4 "><p id="mrs_01_24776__en-us_topic_0000001521080921_p527616291333">Repeated recommendation</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</p></li></ol>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="mrs_01_24533.html">Using HetuEngine Materialized Views</a></div>
</div>
</div>