forked from docs/doc-exports
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com> Co-authored-by: luhuayi <luhuayi@huawei.com> Co-committed-by: luhuayi <luhuayi@huawei.com>
45 lines
7.6 KiB
HTML
45 lines
7.6 KiB
HTML
<a name="EN-US_TOPIC_0000001813598984"></a><a name="EN-US_TOPIC_0000001813598984"></a>
|
|
|
|
<h1 class="topictitle1">Managing Indexes</h1>
|
|
<div id="body1584526252526"><p id="EN-US_TOPIC_0000001813598984__en-us_topic_0185264835_p28820234">You can create indexes in a table to search for data efficiently.</p>
|
|
<p id="EN-US_TOPIC_0000001813598984__en-us_topic_0185264835_p58055515">After a table is created, you can add indexes to it.</p>
|
|
<div class="section" id="EN-US_TOPIC_0000001813598984__en-us_topic_0185264835_section1124173174619"><h4 class="sectiontitle">Creating an Index</h4><ol id="EN-US_TOPIC_0000001813598984__en-us_topic_0185264835_ol36367520114015"><li id="EN-US_TOPIC_0000001813598984__en-us_topic_0185264835_li58872229114015"><span>Right-click <strong id="EN-US_TOPIC_0000001813598984__b136794192693444">Indexes</strong> and choose <strong id="EN-US_TOPIC_0000001813598984__b150973199193444">Create Index</strong> from the shortcut menu.</span><p><p id="EN-US_TOPIC_0000001813598984__en-us_topic_0185264835_p38676356114044">The <strong id="EN-US_TOPIC_0000001813598984__en-us_topic_0185264835_b115351139135">Create Index</strong> dialog box is displayed.</p>
|
|
<p id="EN-US_TOPIC_0000001813598984__p174317264314"><span><img id="EN-US_TOPIC_0000001813598984__image1873892715315" src="figure/en-us_image_0000001813439480.png" width="497.42" height="477.4567" title="Click to enlarge" class="imgResize"></span></p>
|
|
<p id="EN-US_TOPIC_0000001813598984__p1120162165112"></p>
|
|
</p></li><li id="EN-US_TOPIC_0000001813598984__en-us_topic_0185264835_li58081879114025"><span>Enter the details and click <strong id="EN-US_TOPIC_0000001813598984__b35421242123415">Create</strong>. You can also view the SQL statement by clicking the <strong id="EN-US_TOPIC_0000001813598984__b12944155893417">Preview Query</strong> button. Items in <strong id="EN-US_TOPIC_0000001813598984__b44301934183512">Available Columns</strong> are not sorted. Items moved back from <strong id="EN-US_TOPIC_0000001813598984__b155715306377">Index Columns</strong> to <strong id="EN-US_TOPIC_0000001813598984__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_0000001813598984__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_0000001813598984__section1021251313411"><h4 class="sectiontitle">Setting a Tablespace</h4><ol id="EN-US_TOPIC_0000001813598984__ol157156206411"><li id="EN-US_TOPIC_0000001813598984__li1471517201442"><span>Right-click an index and choose <strong id="EN-US_TOPIC_0000001813598984__b1371682018412">Set Tablespace</strong> from the shortcut menu.</span><p><p id="EN-US_TOPIC_0000001813598984__p197165201347">The <strong id="EN-US_TOPIC_0000001813598984__b6863164885620">Set Tablespace</strong> dialog box is displayed.</p>
|
|
<p id="EN-US_TOPIC_0000001813598984__p117175201549"><span><img id="EN-US_TOPIC_0000001813598984__image1169920331055" src="figure/en-us_image_0000001813439492.png"></span></p>
|
|
<p id="EN-US_TOPIC_0000001813598984__p17821168101511"></p>
|
|
</p></li><li id="EN-US_TOPIC_0000001813598984__li1171712010418"><span>Select a tablespace and click <strong id="EN-US_TOPIC_0000001813598984__b88891156145615">OK</strong>. Data Studio displays the operation status in the status bar.</span></li></ol>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001813598984__en-us_topic_0185264835_section2024363194611"><h4 class="sectiontitle">Changing a Fill Factor</h4><p id="EN-US_TOPIC_0000001813598984__en-us_topic_0185264835_p28473001">To change a fill factor, perform the following steps:</p>
|
|
<ol id="EN-US_TOPIC_0000001813598984__en-us_topic_0185264835_ol54930419"><li id="EN-US_TOPIC_0000001813598984__en-us_topic_0185264835_li24611730"><span>Right-click an index and choose <strong id="EN-US_TOPIC_0000001813598984__b1712144712467">Change Fill Factor</strong> from the shortcut menu.</span><p><p id="EN-US_TOPIC_0000001813598984__en-us_topic_0185264835_p13636834">The <strong id="EN-US_TOPIC_0000001813598984__b93761150194618">Change Fill Factor</strong> dialog box is displayed.</p>
|
|
<p id="EN-US_TOPIC_0000001813598984__p179381594415"><span><img id="EN-US_TOPIC_0000001813598984__image443301014414" src="figure/en-us_image_0000001813599276.png"></span></p>
|
|
<p id="EN-US_TOPIC_0000001813598984__p18814512180"></p>
|
|
</p></li><li id="EN-US_TOPIC_0000001813598984__en-us_topic_0185264835_li15154020"><span>Select a fill factor and click <strong id="EN-US_TOPIC_0000001813598984__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_0000001813598984__section1564160951"><h4 class="sectiontitle">Renaming an Index</h4><p id="EN-US_TOPIC_0000001813598984__p20759441951">Follow the steps below to rename an index:</p>
|
|
<ol id="EN-US_TOPIC_0000001813598984__ol12760144554"><li id="EN-US_TOPIC_0000001813598984__li167601641458"><span>Right-click the selected index and select <strong id="EN-US_TOPIC_0000001813598984__b3653134223817">Rename Index</strong>.</span><p><p id="EN-US_TOPIC_0000001813598984__p167601841458">The <strong id="EN-US_TOPIC_0000001813598984__b19919125204014">Rename Index</strong> dialog box is displayed.</p>
|
|
</p></li><li id="EN-US_TOPIC_0000001813598984__li6760204158"><span>Enter a new name and click <strong id="EN-US_TOPIC_0000001813598984__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_0000001813598984__en-us_topic_0185264835_section192431131204620"><h4 class="sectiontitle">Deleting an Index</h4><p id="EN-US_TOPIC_0000001813598984__en-us_topic_0185264835_p384164003211">Perform the following steps to delete an index:</p>
|
|
<ol id="EN-US_TOPIC_0000001813598984__en-us_topic_0185264835_ol37298263"><li id="EN-US_TOPIC_0000001813598984__en-us_topic_0185264835_li140055"><span>Right-click an index and choose <strong id="EN-US_TOPIC_0000001813598984__en-us_topic_0185264835_b1571012210151">Drop Index</strong> from the shortcut menu.</span><p><p id="EN-US_TOPIC_0000001813598984__en-us_topic_0185264835_p5286172585417">The <strong id="EN-US_TOPIC_0000001813598984__en-us_topic_0185264835_b911662620152">Drop Index</strong> dialog box is displayed.</p>
|
|
</p></li><li id="EN-US_TOPIC_0000001813598984__en-us_topic_0185264835_li56977217"><span>In the confirmation dialog box, click <strong id="EN-US_TOPIC_0000001813598984__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_0000001813598984__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_0000001813598984__en-us_topic_0185264835_p63113823">When the last index of a table is deleted, the value of the <strong id="EN-US_TOPIC_0000001813598984__b18747148793444">Has Index</strong> parameter may still be <strong id="EN-US_TOPIC_0000001813598984__b144066386893444">TRUE</strong>. After a vacuum operation is performed on the table, this parameter will change to <strong id="EN-US_TOPIC_0000001813598984__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_017.html">Creating a Regular Table</a></div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<script language="JavaScript">
|
|
<!--
|
|
image_size('.imgResize');
|
|
var msg_imageMax = "view original image";
|
|
var msg_imageClose = "close";
|
|
//--></script> |