Files
doc-exports/docs/dws/tool/DWS_DS_75.html
Lu, Huayi 4194b50d78 DWS TOOL 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>
2022-12-14 20:46:26 +00:00

32 lines
7.7 KiB
HTML

<a name="EN-US_TOPIC_0000001098993172"></a><a name="EN-US_TOPIC_0000001098993172"></a>
<h1 class="topictitle1">Managing Indexes</h1>
<div id="body1584526252526"><p id="EN-US_TOPIC_0000001098993172__en-us_topic_0185264835_p28820234">You can create indexes in a table to search for data efficiently.</p>
<p id="EN-US_TOPIC_0000001098993172__en-us_topic_0185264835_p58055515">After a table is created, you can add indexes to it. You can perform the following operations only in a common table:</p>
<ul id="EN-US_TOPIC_0000001098993172__en-us_topic_0185264835_ul6903429113326"><li id="EN-US_TOPIC_0000001098993172__en-us_topic_0185264835_li15784131174419"><a href="#EN-US_TOPIC_0000001098993172__en-us_topic_0185264835_section1124173174619">Creating an Index</a></li><li id="EN-US_TOPIC_0000001098993172__en-us_topic_0185264835_li530811543910"><a href="#EN-US_TOPIC_0000001098993172__en-us_topic_0185264835_section024218316464">Renaming an Index</a></li><li id="EN-US_TOPIC_0000001098993172__en-us_topic_0185264835_li296216596912"><a href="#EN-US_TOPIC_0000001098993172__en-us_topic_0185264835_section2024363194611">Changing a Fill Factor</a></li><li id="EN-US_TOPIC_0000001098993172__en-us_topic_0185264835_li1744143121011"><a href="#EN-US_TOPIC_0000001098993172__en-us_topic_0185264835_section192431131204620">Deleting an Index</a></li></ul>
<div class="section" id="EN-US_TOPIC_0000001098993172__en-us_topic_0185264835_section1124173174619"><a name="EN-US_TOPIC_0000001098993172__en-us_topic_0185264835_section1124173174619"></a><a name="en-us_topic_0185264835_section1124173174619"></a><h4 class="sectiontitle">Creating an Index</h4><p id="EN-US_TOPIC_0000001098993172__en-us_topic_0185264835_p63453834">Perform the following steps to add an index to a table:</p>
<ol id="EN-US_TOPIC_0000001098993172__en-us_topic_0185264835_ol36367520114015"><li id="EN-US_TOPIC_0000001098993172__en-us_topic_0185264835_li58872229114015"><span>Right-click <strong id="EN-US_TOPIC_0000001098993172__b136794192693444">Indexes</strong> and choose <strong id="EN-US_TOPIC_0000001098993172__b150973199193444">Create Index</strong> from the shortcut menu.</span><p><p id="EN-US_TOPIC_0000001098993172__en-us_topic_0185264835_p38676356114044">The <strong id="EN-US_TOPIC_0000001098993172__en-us_topic_0185264835_b115351139135">Create Index</strong> dialog box is displayed.</p>
</p></li><li id="EN-US_TOPIC_0000001098993172__en-us_topic_0185264835_li58081879114025"><span>Enter the details and click <strong id="EN-US_TOPIC_0000001098993172__b35421242123415">Create</strong>. You can also view the SQL statement by clicking the <strong id="EN-US_TOPIC_0000001098993172__b12944155893417">Preview Query</strong> button. Items in <strong id="EN-US_TOPIC_0000001098993172__b44301934183512">Available Columns</strong> are not sorted. Items moved back from <strong id="EN-US_TOPIC_0000001098993172__b155715306377">Index Columns</strong> to <strong id="EN-US_TOPIC_0000001098993172__b87013315378">Available Columns</strong> are unsorted, and is not related to the column order in the table. You can set the order of the <strong id="EN-US_TOPIC_0000001098993172__b2719184819375">Index Columns</strong> using the arrow buttons. Data Studio displays the operation status in the status bar.</span></li></ol>
</div>
<div class="section" id="EN-US_TOPIC_0000001098993172__en-us_topic_0185264835_section024218316464"><a name="EN-US_TOPIC_0000001098993172__en-us_topic_0185264835_section024218316464"></a><a name="en-us_topic_0185264835_section024218316464"></a><h4 class="sectiontitle">Renaming an Index</h4><p id="EN-US_TOPIC_0000001098993172__en-us_topic_0185264835_p64532806114215">Follow the steps below to rename an index:</p>
<ol id="EN-US_TOPIC_0000001098993172__en-us_topic_0185264835_ol34213602"><li id="EN-US_TOPIC_0000001098993172__en-us_topic_0185264835_li39486963"><span>Right-click the selected index and select <strong id="EN-US_TOPIC_0000001098993172__b3653134223817">Rename Index</strong>.</span><p><p id="EN-US_TOPIC_0000001098993172__en-us_topic_0185264835_p10927931114343">The <strong id="EN-US_TOPIC_0000001098993172__b19919125204014">Rename Index</strong> dialog box is displayed.</p>
</p></li><li id="EN-US_TOPIC_0000001098993172__en-us_topic_0185264835_li53827050114229"><span>Enter a new name and click <strong id="EN-US_TOPIC_0000001098993172__en-us_topic_0185264835_b1230712477137">OK</strong>. Data Studio displays the operation status in the status bar.</span></li></ol>
</div>
<div class="section" id="EN-US_TOPIC_0000001098993172__en-us_topic_0185264835_section2024363194611"><a name="EN-US_TOPIC_0000001098993172__en-us_topic_0185264835_section2024363194611"></a><a name="en-us_topic_0185264835_section2024363194611"></a><h4 class="sectiontitle">Changing a Fill Factor</h4><p id="EN-US_TOPIC_0000001098993172__en-us_topic_0185264835_p28473001">To change a fill factor, perform the following steps:</p>
<ol id="EN-US_TOPIC_0000001098993172__en-us_topic_0185264835_ol54930419"><li id="EN-US_TOPIC_0000001098993172__en-us_topic_0185264835_li24611730"><span>Right-click an index and choose <strong id="EN-US_TOPIC_0000001098993172__en-us_topic_0185264835_b15595112411142">Change Fill Factor</strong> from the shortcut menu.</span><p><p id="EN-US_TOPIC_0000001098993172__en-us_topic_0185264835_p13636834">The <strong id="EN-US_TOPIC_0000001098993172__en-us_topic_0185264835_b12522203212143">Change Fill Factor</strong> dialog box is displayed.</p>
</p></li><li id="EN-US_TOPIC_0000001098993172__en-us_topic_0185264835_li15154020"><span>Select a fill factor and click <strong id="EN-US_TOPIC_0000001098993172__en-us_topic_0185264835_b105437372149">OK</strong>. Data Studio displays the operation status in the status bar.</span></li></ol>
</div>
<div class="section" id="EN-US_TOPIC_0000001098993172__en-us_topic_0185264835_section192431131204620"><a name="EN-US_TOPIC_0000001098993172__en-us_topic_0185264835_section192431131204620"></a><a name="en-us_topic_0185264835_section192431131204620"></a><h4 class="sectiontitle">Deleting an Index</h4><p id="EN-US_TOPIC_0000001098993172__en-us_topic_0185264835_p384164003211">Perform the following steps to delete an index:</p>
<ol id="EN-US_TOPIC_0000001098993172__en-us_topic_0185264835_ol37298263"><li id="EN-US_TOPIC_0000001098993172__en-us_topic_0185264835_li140055"><span>Right-click an index and choose <strong id="EN-US_TOPIC_0000001098993172__en-us_topic_0185264835_b1571012210151">Drop Index</strong> from the shortcut menu.</span><p><p id="EN-US_TOPIC_0000001098993172__en-us_topic_0185264835_p5286172585417">The <strong id="EN-US_TOPIC_0000001098993172__en-us_topic_0185264835_b911662620152">Drop Index</strong> dialog box is displayed.</p>
</p></li><li id="EN-US_TOPIC_0000001098993172__en-us_topic_0185264835_li56977217"><span>In the confirmation dialog box, click <strong id="EN-US_TOPIC_0000001098993172__en-us_topic_0185264835_b11497928181514">OK</strong>. Data Studio displays the operation status in the status bar. The index will be deleted from the table.</span><p><div class="note" id="EN-US_TOPIC_0000001098993172__en-us_topic_0185264835_note51751889"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p class="text" id="EN-US_TOPIC_0000001098993172__en-us_topic_0185264835_p63113823">When the last index of a table is deleted, the value of the <strong id="EN-US_TOPIC_0000001098993172__b18747148793444">Has Index</strong> parameter may still be <strong id="EN-US_TOPIC_0000001098993172__b144066386893444">TRUE</strong>. After a vacuum operation is performed on the table, this parameter will change to <strong id="EN-US_TOPIC_0000001098993172__b32975953693444">FALSE</strong>.</p>
</div></div>
</p></li></ol>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="DWS_DS_71.html">Creating Regular Table</a></div>
</div>
</div>