Yang, Tong 6182f91ba8 MRS component operation guide_normal 2.0.38.SP20 version
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
Co-authored-by: Yang, Tong <yangtong2@huawei.com>
Co-committed-by: Yang, Tong <yangtong2@huawei.com>
2022-12-09 14:55:21 +00:00

20 lines
1.9 KiB
HTML

<a name="mrs_01_2029"></a><a name="mrs_01_2029"></a>
<h1 class="topictitle1">How to Use Cache Table?</h1>
<div id="body1595920221124"><div class="section" id="mrs_01_2029__sc3df3b12bfc2403694bc4b4b954e50d9"><h4 class="sectiontitle">Question</h4><p id="mrs_01_2029__acb88ed91a8984a1eaa36df8ba6ede77a">What is cache table used for? Which point should I pay attention to while using cache table?</p>
</div>
<div class="section" id="mrs_01_2029__sf8aa1e67b53841cfad9e7ee5fe1bd97e"><h4 class="sectiontitle">Answer</h4><p id="mrs_01_2029__a73da52e844ab43e39ccbd44d6c4d7707">Spark SQL caches tables into memory so that data can be directly read from memory instead of disks, reducing memory overhead due to disk reads.</p>
<p id="mrs_01_2029__aac7dd4e8c31f46c6bc3ca6999e165479">Note that cached tables consume Executor's memory. This means that caching large or many tables compromises Executor's stability even if compressed storage has been used to reduce memory overhead as much as possible.</p>
<p id="mrs_01_2029__a3a7303e50f124a08a4c0a8642ee6f217">If it is no longer necessary to accelerate data query by means of cache table, run the following command to uncache tables to free up memory:</p>
<p id="mrs_01_2029__aed1d9b734dac4b1ea9664154419cc2a4"><i><b><span class="cmdname" style="font-family:Arial" id="mrs_01_2029__cc4039d329ec6450e9ce9e0b4600ae4b8">uncache table</span></b></i> <i><span class="varname" id="mrs_01_2029__v85341f40ac2048e4a7731b3f18571a68">table_name</span></i></p>
<div class="note" id="mrs_01_2029__n8958bcf404e74fe8b6aa8f893cdb7e12"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="mrs_01_2029__af6d3327e679c40c5b231f09c50672ba8">The Storage tab page of the Spark Driver user interface displays the cached tables.</p>
</div></div>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="mrs_01_2022.html">Spark SQL and DataFrame</a></div>
</div>
</div>