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

56 lines
5.6 KiB
HTML

<a name="mrs_01_1444"></a><a name="mrs_01_1444"></a>
<h1 class="topictitle1">SHOW SEGMENTS</h1>
<div id="body1595920214005"><div class="section" id="mrs_01_1444__s8de7d3f8eabe4b0b93461ee4793df6c2"><h4 class="sectiontitle">Function</h4><p id="mrs_01_1444__a7396b9cee84b476287a67429ce4e123d">This command is used to list the segments of a CarbonData table.</p>
</div>
<div class="section" id="mrs_01_1444__s4784a60e7ec64c8f872d46f57ed8d584"><h4 class="sectiontitle">Syntax</h4><p id="mrs_01_1444__a47349fc12d3441f69c3115a655d103a1"><b><span class="cmdname" id="mrs_01_1444__cmdname153545318189">SHOW SEGMENTS FOR TABLE</span></b> <i><span class="varname" id="mrs_01_1444__v58c39f6da36e44428425613945ebe6bd">[db_name.]table_name</span></i> <b><span class="cmdname" id="mrs_01_1444__cmdname1141875715185">LIMIT</span></b> <i><span class="varname" id="mrs_01_1444__v6643f31f97bb4bc29eec4dd98e9a14c1">number_of_loads;</span></i></p>
</div>
<div class="section" id="mrs_01_1444__sedb6bc1c7b484d93bd9ab3af7319951d"><h4 class="sectiontitle">Parameter Description</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="mrs_01_1444__ta09fa7014dab429593ebb96e0ae17b31" frame="border" border="1" rules="all"><caption><b>Table 1 </b>SHOW SEGMENTS FOR TABLE parameters</caption><thead align="left"><tr id="mrs_01_1444__rab8046d7b94f4d36a768682a361b7161"><th align="left" class="cellrowborder" valign="top" width="26.51%" id="mcps1.3.3.2.2.3.1.1"><p id="mrs_01_1444__ad3ee3856a0a84d4695d23f759685b3a7"><strong id="mrs_01_1444__aa8d8a6c5b6914d33b531d4dd948eaf4a">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="73.49%" id="mcps1.3.3.2.2.3.1.2"><p id="mrs_01_1444__a64697018ded9494db311af39d51188b2"><strong id="mrs_01_1444__a156fa3a77c9c418a9c82d271bc81434b">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="mrs_01_1444__r88aa8294f49c4fd9aabe093b8981e596"><td class="cellrowborder" valign="top" width="26.51%" headers="mcps1.3.3.2.2.3.1.1 "><p id="mrs_01_1444__a2ebb7df638754ada8c6a68f3ae17cfb3">db_name</p>
</td>
<td class="cellrowborder" valign="top" width="73.49%" headers="mcps1.3.3.2.2.3.1.2 "><p id="mrs_01_1444__afd720ec8d9b44e11a079a9ae44088d72">Database name. If this parameter is not specified, the current database is used.</p>
</td>
</tr>
<tr id="mrs_01_1444__r00766911af5f433c9c4ac7ecd51aca7d"><td class="cellrowborder" valign="top" width="26.51%" headers="mcps1.3.3.2.2.3.1.1 "><p id="mrs_01_1444__a402498c6608e4fb8a34f29b32085c768">table_name</p>
</td>
<td class="cellrowborder" valign="top" width="73.49%" headers="mcps1.3.3.2.2.3.1.2 "><p id="mrs_01_1444__ab2b541a054dc4cb58d5c206a3da43b9d">Name of a table in the specified database</p>
</td>
</tr>
<tr id="mrs_01_1444__r3824a8ac1394437183a5894f7567ff8b"><td class="cellrowborder" valign="top" width="26.51%" headers="mcps1.3.3.2.2.3.1.1 "><p id="mrs_01_1444__aef445e00e9144e82b981ba59a4383133">number_of_loads</p>
</td>
<td class="cellrowborder" valign="top" width="73.49%" headers="mcps1.3.3.2.2.3.1.2 "><p id="mrs_01_1444__a7f589625df1c424d9cfe93d17c0ea77c">Threshold of records to be listed</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="mrs_01_1444__s9b7cbbdb9a4f4be7a4b289cf97d3b0a4"><h4 class="sectiontitle">Precautions</h4><p id="mrs_01_1444__ace71bf770b5d49ac8e05d7d8f5f12462">None</p>
</div>
<div class="section" id="mrs_01_1444__s40cc40bf8c944c69854c994532f6ef57"><h4 class="sectiontitle">Examples</h4><p id="mrs_01_1444__p15764562010"><strong id="mrs_01_1444__b10636141818204">create table </strong><strong id="mrs_01_1444__b16741193611259">carbon01(a int,b string,c string) stored as carbondata;</strong></p>
<p id="mrs_01_1444__p857515192013"><strong id="mrs_01_1444__b1563573542519">i</strong><strong id="mrs_01_1444__b26367351254">nsert into </strong><strong id="mrs_01_1444__b106361935102513">table</strong><strong id="mrs_01_1444__b5742236162518"> carbon01 select 1,'a','aa';</strong></p>
<p id="mrs_01_1444__p205756512204"><strong id="mrs_01_1444__b14638153511257">insert into table </strong><strong id="mrs_01_1444__b17743133613257">carbon01 select 2,'b','bb';</strong></p>
<p id="mrs_01_1444__p9575125182013"><strong id="mrs_01_1444__b96392350252">insert into table</strong><strong id="mrs_01_1444__b16744143622519"> carbon01 select 3,'c','cc';</strong></p>
<p id="mrs_01_1444__p165751856209"><strong id="mrs_01_1444__b464133510255">SHOW SEGMENTS FOR TABLE </strong><strong id="mrs_01_1444__b874523652514">carbon01 </strong><strong id="mrs_01_1444__b664153514253">LIMIT</strong><strong id="mrs_01_1444__b18745173612518"> 2;</strong></p>
</div>
<div class="section" id="mrs_01_1444__s20ee73a8f7b549d39358c7f89c46e13b"><h4 class="sectiontitle">System Response</h4><pre class="screen" id="mrs_01_1444__screen3283537111114">+-----+----------+--------------------------+------------------+------------+------------+-------------+--------------+--+
| ID | Status | Load Start Time | Load Time Taken | Partition | Data Size | Index Size | File Format |
+-----+----------+--------------------------+------------------+------------+------------+-------------+--------------+--+
| 3 | Success | 2020-09-28 22:53:26.336 | 3.726S | {} | 6.47KB | 3.30KB | columnar_v3 |
| 2 | Success | 2020-09-28 22:53:01.702 | 6.688S | {} | 6.47KB | 3.30KB | columnar_v3 |
+-----+----------+--------------------------+------------------+------------+------------+-------------+--------------+--+</pre>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="mrs_01_1437.html">DML</a></div>
</div>
</div>