doc-exports/docs/dws/tool/dws_16_0148.html
Lu, Huayi 27019c2991 DWS TOOL 830.201 version
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>
2024-05-16 07:35:25 +00:00

66 lines
4.2 KiB
HTML

<a name="EN-US_TOPIC_0000001819416233"></a><a name="EN-US_TOPIC_0000001819416233"></a>
<h1 class="topictitle1">ROW_FORMAT</h1>
<div id="body8662426"><p id="EN-US_TOPIC_0000001819416233__en-us_topic_0000001657865338_en-us_topic_0000001435896189_en-us_topic_0214164761_p579713312318"><strong id="EN-US_TOPIC_0000001819416233__en-us_topic_0000001657865338_en-us_topic_0000001435896189_b15641708783224">ROW_FORMAT</strong> defines the physical format in which the rows are stored. Row format choices vary depending on the storage engine used for the table. If you specify a row format that is not supported by the storage engine that is used for the table, the table will be created using that storage engine's default row format. If <strong id="EN-US_TOPIC_0000001819416233__en-us_topic_0000001657865338_en-us_topic_0000001435896189_b18732995373224">ROW_FORMAT</strong> is set to <strong id="EN-US_TOPIC_0000001819416233__en-us_topic_0000001657865338_en-us_topic_0000001435896189_b12219384953224">DEFAULT</strong>, the value will be migrated to <strong id="EN-US_TOPIC_0000001819416233__en-us_topic_0000001657865338_en-us_topic_0000001435896189_b1536498243224">SET NOCOMPRESS</strong>. If <strong id="EN-US_TOPIC_0000001819416233__en-us_topic_0000001657865338_en-us_topic_0000001435896189_b8064526663224">ROW_FORMAT</strong> is set to <strong id="EN-US_TOPIC_0000001819416233__en-us_topic_0000001657865338_en-us_topic_0000001435896189_b5005847453224">COMPRESSED</strong>, the value will be migrated to <strong id="EN-US_TOPIC_0000001819416233__en-us_topic_0000001657865338_en-us_topic_0000001435896189_b21396426493224">SET COMPRESS</strong>. GaussDB(DWS) supports only the preceding two <strong id="EN-US_TOPIC_0000001819416233__en-us_topic_0000001657865338_en-us_topic_0000001435896189_b9551188083224">ROW_FORMAT</strong> values. If other values are used, they will be deleted by DSC.</p>
<p id="EN-US_TOPIC_0000001819416233__en-us_topic_0000001657865338_en-us_topic_0000001435896189_en-us_topic_0214164761_p1634512101858"><strong id="EN-US_TOPIC_0000001819416233__en-us_topic_0000001657865338_en-us_topic_0000001435896189_en-us_topic_0214164761_b2694115616557">Input</strong></p>
<pre class="screen" id="EN-US_TOPIC_0000001819416233__en-us_topic_0000001657865338_en-us_topic_0000001435896189_en-us_topic_0214164761_screen153713219158">CREATE TABLE `public`.`runoob_alter_test`(
`dataType1` int NOT NULL AUTO_INCREMENT,
`dataType2` FLOAT(10,2),
`dataType3` DOUBLE(20,8),
`dataType4` TEXT NOT NULL,
PRIMARY KEY(`dataType1`)
) ENGINE=InnoDB;
## A.
ALTER TABLE runoob_alter_test ROW_FORMAT DEFAULT;
ALTER TABLE runoob_alter_test ROW_FORMAT=DEFAULT;
## B.
ALTER TABLE runoob_alter_test ROW_FORMAT DYNAMIC;
ALTER TABLE runoob_alter_test ROW_FORMAT=DYNAMIC;
## C.
ALTER TABLE runoob_alter_test ROW_FORMAT COMPRESSED;
ALTER TABLE runoob_alter_test ROW_FORMAT=COMPRESSED;
## D.
ALTER TABLE runoob_alter_test ROW_FORMAT REDUNDANT;
ALTER TABLE runoob_alter_test ROW_FORMAT=REDUNDANT;
## E.
ALTER TABLE runoob_alter_test ROW_FORMAT COMPACT;
ALTER TABLE runoob_alter_test ROW_FORMAT=COMPACT;</pre>
<p id="EN-US_TOPIC_0000001819416233__en-us_topic_0000001657865338_en-us_topic_0000001435896189_en-us_topic_0214164761_p12114173518210"><strong id="EN-US_TOPIC_0000001819416233__en-us_topic_0000001657865338_en-us_topic_0000001435896189_en-us_topic_0214164761_b1691200195611">Output</strong></p>
<pre class="screen" id="EN-US_TOPIC_0000001819416233__en-us_topic_0000001657865338_en-us_topic_0000001435896189_en-us_topic_0214164761_screen13966133461520">CREATE TABLE "public"."runoob_alter_test"
(
"datatype1" SERIAL NOT NULL,
"datatype2" REAL,
"datatype3" DOUBLE PRECISION,
"datatype4" TEXT NOT NULL,
PRIMARY KEY ("datatype1")
)
WITH ( ORIENTATION = ROW, COMPRESSION = NO )
NOCOMPRESS
DISTRIBUTE BY HASH ("datatype1");
-- A.
ALTER TABLE "public"."runoob_alter_test" SET NOCOMPRESS;
ALTER TABLE "public"."runoob_alter_test" SET NOCOMPRESS;
-- B.
-- C.
ALTER TABLE "public"."runoob_alter_test" SET COMPRESS;
ALTER TABLE "public"."runoob_alter_test" SET COMPRESS;
-- D.
-- E.</pre>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dws_16_0119.html">Table (Optional Parameters and Operations)</a></div>
</div>
</div>