forked from docs/doc-exports
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com> Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com> Co-authored-by: Lu, Huayi <luhuayi@huawei.com> Co-committed-by: Lu, Huayi <luhuayi@huawei.com>
30 lines
3.3 KiB
HTML
30 lines
3.3 KiB
HTML
<a name="EN-US_TOPIC_0000001772696220"></a><a name="EN-US_TOPIC_0000001772696220"></a>
|
|
|
|
<h1 class="topictitle1">Renaming an Index</h1>
|
|
<div id="body8662426"><p id="EN-US_TOPIC_0000001772696220__en-us_topic_0000001658024878_en-us_topic_0000001442738977_p8060118">DSC supports renaming indexes. Prefix a table name to an index name to prevent name conflicts. (Only DDL statements with specific index names can be created. Currently, the name of a renamed index cannot be deleted. Exercise caution when modifying this parameter.)</p>
|
|
<p id="EN-US_TOPIC_0000001772696220__en-us_topic_0000001658024878_en-us_topic_0000001442738977_en-us_topic_0214164389_p81991901721"><strong id="EN-US_TOPIC_0000001772696220__en-us_topic_0000001658024878_en-us_topic_0000001442738977_b7626193013256">Modifying the configuration</strong></p>
|
|
<p id="EN-US_TOPIC_0000001772696220__en-us_topic_0000001658024878_en-us_topic_0000001442738977_p821891182817">Open <a href="dws_16_0016.html#EN-US_TOPIC_0000001772696060__en-us_topic_0000001706105077_en-us_topic_0000001434418777_table1740918360500">Table 1 Configuration parameters in the features-mysql.properties file</a> and change the value of the following parameter to <strong id="EN-US_TOPIC_0000001772696220__en-us_topic_0000001658024878_en-us_topic_0000001442738977_b161971449174215">true</strong>: The default value is <strong id="EN-US_TOPIC_0000001772696220__en-us_topic_0000001658024878_en-us_topic_0000001442738977_b586835334219">false</strong>, indicating that the file will not be renamed.</p>
|
|
<pre class="screen" id="EN-US_TOPIC_0000001772696220__en-us_topic_0000001658024878_en-us_topic_0000001442738977_en-us_topic_0214164389_screen82007491711"># Whether to rename an index when creating the index.
|
|
table.index.rename=true</pre>
|
|
<p id="EN-US_TOPIC_0000001772696220__en-us_topic_0000001658024878_en-us_topic_0000001442738977_en-us_topic_0214164733_p636619384129"><strong id="EN-US_TOPIC_0000001772696220__en-us_topic_0000001658024878_en-us_topic_0000001442738977_en-us_topic_0214164733_b153660389121">Input</strong></p>
|
|
<pre class="screen" id="EN-US_TOPIC_0000001772696220__en-us_topic_0000001658024878_en-us_topic_0000001442738977_screen164399196361">CREATE TABLE IF NOT EXISTS `CUSTOMER`(
|
|
`NAME` VARCHAR(64) PRIMARY KEY,
|
|
ID INTEGER,
|
|
ID2 INTEGER);
|
|
CREATE INDEX ID_INDEX USING BTREE ON CUSTOMER (ID);
|
|
ALTER TABLE CUSTOMER ADD INDEX ID3_INDEX(ID2);</pre>
|
|
<p id="EN-US_TOPIC_0000001772696220__en-us_topic_0000001658024878_en-us_topic_0000001442738977_en-us_topic_0214164733_p17366193816128"><strong id="EN-US_TOPIC_0000001772696220__en-us_topic_0000001658024878_en-us_topic_0000001442738977_en-us_topic_0214164733_b1836613821217">Output</strong></p>
|
|
<pre class="screen" id="EN-US_TOPIC_0000001772696220__en-us_topic_0000001658024878_en-us_topic_0000001442738977_en-us_topic_0214164733_screen936612384127">CREATE TABLE IF NOT EXISTS "public"."customer" (
|
|
"name" VARCHAR(256) PRIMARY KEY,
|
|
"id" INTEGER,
|
|
"id2" INTEGER) WITH (ORIENTATION = ROW, COMPRESSION = NO) NOCOMPRESS DISTRIBUTE BY HASH ("name");
|
|
CREATE INDEX customer_id_index ON "public"."customer" USING BTREE ("id");
|
|
CREATE INDEX customer_id3_index ON "public"."customer" ("id2");</pre>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="dws_16_0166.html">Indexes</a></div>
|
|
</div>
|
|
</div>
|
|
|