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>
48 lines
2.8 KiB
HTML
48 lines
2.8 KiB
HTML
<a name="EN-US_TOPIC_0000001772696196"></a><a name="EN-US_TOPIC_0000001772696196"></a>
|
|
|
|
<h1 class="topictitle1">STATS_PERSISTENT</h1>
|
|
<div id="body8662426"><p id="EN-US_TOPIC_0000001772696196__en-us_topic_0000001657865542_en-us_topic_0000001385776014_en-us_topic_0214164677_p579713312318">In MySQL, <strong id="EN-US_TOPIC_0000001772696196__en-us_topic_0000001657865542_en-us_topic_0000001385776014_b9881077033256">STATS_PERSISTENT</strong> specifies whether to enable persistence statistics for an InnoDB table. The <strong id="EN-US_TOPIC_0000001772696196__en-us_topic_0000001657865542_en-us_topic_0000001385776014_b1251722323256">CREATE TABLE</strong> and <strong id="EN-US_TOPIC_0000001772696196__en-us_topic_0000001657865542_en-us_topic_0000001385776014_b8241234793256">ALTER TABLE</strong> statements can be used to enable persistence statistics. DSC will delete this attribute during migration.</p>
|
|
<p id="EN-US_TOPIC_0000001772696196__en-us_topic_0000001657865542_en-us_topic_0000001385776014_en-us_topic_0214164677_p2730413959"><strong id="EN-US_TOPIC_0000001772696196__en-us_topic_0000001657865542_en-us_topic_0000001385776014_en-us_topic_0214164677_b8947111225615">Input</strong></p>
|
|
<pre class="screen" id="EN-US_TOPIC_0000001772696196__en-us_topic_0000001657865542_en-us_topic_0000001385776014_en-us_topic_0214164677_screen13538625524">CREATE TABLE `public`.`runoob_alter_test`(
|
|
`dataType1` int NOT NULL AUTO_INCREMENT,
|
|
`dataType2` DOUBLE(20,8),
|
|
`dataType3` TEXT NOT NULL,
|
|
PRIMARY KEY(`dataType1`)
|
|
) ENGINE=InnoDB, STATS_PERSISTENT=0;
|
|
|
|
## A.
|
|
ALTER TABLE runoob_alter_test STATS_PERSISTENT DEFAULT;
|
|
ALTER TABLE runoob_alter_test STATS_PERSISTENT=DEFAULT;
|
|
|
|
## B.
|
|
ALTER TABLE runoob_alter_test STATS_PERSISTENT 0;
|
|
ALTER TABLE runoob_alter_test STATS_PERSISTENT=0;
|
|
|
|
## C.
|
|
ALTER TABLE runoob_alter_test STATS_PERSISTENT 1;
|
|
ALTER TABLE runoob_alter_test STATS_PERSISTENT=1;</pre>
|
|
<p id="EN-US_TOPIC_0000001772696196__en-us_topic_0000001657865542_en-us_topic_0000001385776014_en-us_topic_0214164677_p12114173518210"><strong id="EN-US_TOPIC_0000001772696196__en-us_topic_0000001657865542_en-us_topic_0000001385776014_en-us_topic_0214164677_b7740171685613">Output</strong></p>
|
|
<pre class="screen" id="EN-US_TOPIC_0000001772696196__en-us_topic_0000001657865542_en-us_topic_0000001385776014_en-us_topic_0214164677_screen1360576145519">CREATE TABLE "public"."runoob_alter_test"
|
|
(
|
|
"datatype1" SERIAL NOT NULL,
|
|
"datatype2" DOUBLE PRECISION,
|
|
"datatype3" TEXT NOT NULL,
|
|
PRIMARY KEY ("datatype1")
|
|
)
|
|
WITH ( ORIENTATION = ROW, COMPRESSION = NO )
|
|
NOCOMPRESS
|
|
DISTRIBUTE BY HASH ("datatype1");
|
|
|
|
-- A.
|
|
|
|
-- B.
|
|
|
|
-- C.</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>
|
|
|