{"id":1230,"date":"2020-12-05T11:30:50","date_gmt":"2020-12-05T03:30:50","guid":{"rendered":"http:\/\/www.821121.com\/?p=1230"},"modified":"2020-12-29T11:32:30","modified_gmt":"2020-12-29T03:32:30","slug":"12c%e6%96%b0%e7%89%b9%e6%80%a7%ef%bc%9ainmemory%e5%ae%9e%e6%88%98%ef%bc%885%ef%bc%89%e5%af%b9%e5%88%97%e8%bf%9b%e8%a1%8cinmemory%e7%9a%84%e6%93%8d%e4%bd%9c","status":"publish","type":"post","link":"http:\/\/www.821121.com\/?p=1230","title":{"rendered":"12C\u65b0\u7279\u6027\uff1aINMEMORY\u5b9e\u6218\uff085\uff09\u5bf9\u5217\u8fdb\u884cinmemory\u7684\u64cd\u4f5c"},"content":{"rendered":"<p>\u521b\u5efa\u6d4b\u8bd5\u8868<\/p>\n<pre><code class=\"language-sql\">SQL&gt; create table test2 as select OWNER,OBJECT_NAME,OBJECT_ID from dba_objects;\n\nTable created.\n\nSQL&gt; COL TABLE_NAME FORMAT a20\nSQL&gt; COL COLUMN_NAME FORMAT a20\nSQL&gt; SELECT TABLE_NAME, COLUMN_NAME, INMEMORY_COMPRESSION FROM   V$IM_COLUMN_LEVEL WHERE  TABLE_NAME = &#039;TEST2&#039; ORDER BY COLUMN_NAME;\n\nno rows selected<\/code><\/pre>\n<p>\u6d4b\u8bd5\u628a\u5355\u72ec\u7684\u5217\u653e\u5230inmemory<\/p>\n<pre><code class=\"language-sql\">SQL&gt; alter table test2 inmemory(OBJECT_NAME);\n\nTable altered.<\/code><\/pre>\n<p>\u67e5\u770b\u7ed3\u679c\uff0c\u6240\u6709\u7684\u5217\u90fd\u653e\u5165inmemory\uff0c\u5f97\u51fa\u7ed3\u8bba\uff1a\u65e0\u6cd5\u4ec5\u5bf9\u67d0\u5217\u76f4\u63a5\u653e\u5165inmemory<\/p>\n<pre><code class=\"language-sql\">SQL&gt; COL TABLE_NAME FORMAT a20\nSQL&gt; COL COLUMN_NAME FORMAT a20\nSQL&gt; set linesize 200\nSQL&gt; SELECT TABLE_NAME, COLUMN_NAME, INMEMORY_COMPRESSION FROM   V$IM_COLUMN_LEVEL WHERE  TABLE_NAME = &#039;TEST2&#039; ORDER BY COLUMN_NAME;\n\nTABLE_NAME           COLUMN_NAME          INMEMORY_COMPRESSION\n-------------------- -------------------- ------------------------------------------------------------------------------\nTEST2                OBJECT_ID            DEFAULT\nTEST2                OBJECT_NAME          DEFAULT\nTEST2                OWNER                DEFAULT<\/code><\/pre>\n<p>\u5bf9\u5217\u8fdb\u884cno inmemory<\/p>\n<pre><code class=\"language-sql\">SQL&gt; alter table test2 no inmemory(OBJECT_NAME);\n\nTable altered.\n\nSQL&gt; SELECT TABLE_NAME, COLUMN_NAME, INMEMORY_COMPRESSION FROM   V$IM_COLUMN_LEVEL WHERE  TABLE_NAME = &#039;TEST2&#039; ORDER BY COLUMN_NAME;\n\nTABLE_NAME           COLUMN_NAME          INMEMORY_COMPRESSION\n-------------------- -------------------- ------------------------------------------------------------------------------\nTEST2                OBJECT_ID            DEFAULT\nTEST2                OBJECT_NAME          NO INMEMORY\nTEST2                OWNER                DEFAULT<\/code><\/pre>\n<p>\u4fee\u6539\u5217\u7684\u538b\u7f29\u7b56\u7565<\/p>\n<pre><code class=\"language-sql\">SQL&gt; alter table test2 INMEMORY MEMCOMPRESS FOR CAPACITY HIGH (OBJECT_ID);\n\nTable altered.\n\nSQL&gt; SELECT TABLE_NAME, COLUMN_NAME, INMEMORY_COMPRESSION FROM   V$IM_COLUMN_LEVEL WHERE  TABLE_NAME = &#039;TEST2&#039; ORDER BY COLUMN_NAME;\n\nTABLE_NAME           COLUMN_NAME          INMEMORY_COMPRESSION\n-------------------- -------------------- ------------------------------------------------------------------------------\nTEST2                OBJECT_ID            FOR CAPACITY HIGH\nTEST2                OBJECT_NAME          NO INMEMORY\nTEST2                OWNER                DEFAULT\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u521b\u5efa\u6d4b\u8bd5\u8868 SQL&gt; create tabl<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[47,19],"tags":[],"class_list":["post-1230","post","type-post","status-publish","format-standard","hentry","category-in-memory","category-oracle-12c"],"_links":{"self":[{"href":"http:\/\/www.821121.com\/index.php?rest_route=\/wp\/v2\/posts\/1230","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.821121.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.821121.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.821121.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.821121.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1230"}],"version-history":[{"count":1,"href":"http:\/\/www.821121.com\/index.php?rest_route=\/wp\/v2\/posts\/1230\/revisions"}],"predecessor-version":[{"id":1231,"href":"http:\/\/www.821121.com\/index.php?rest_route=\/wp\/v2\/posts\/1230\/revisions\/1231"}],"wp:attachment":[{"href":"http:\/\/www.821121.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1230"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.821121.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1230"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.821121.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1230"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}