{"id":1212,"date":"2020-12-01T09:30:06","date_gmt":"2020-12-01T01:30:06","guid":{"rendered":"http:\/\/www.821121.com\/?p=1212"},"modified":"2020-12-25T10:51:40","modified_gmt":"2020-12-25T02:51:40","slug":"12c%e6%96%b0%e7%89%b9%e6%80%a7%ef%bc%9ain-memory%e5%ae%9e%e6%88%98%ef%bc%881%ef%bc%89%e5%bc%80%e5%90%afinmemory","status":"publish","type":"post","link":"http:\/\/www.821121.com\/?p=1212","title":{"rendered":"12C\u65b0\u7279\u6027\uff1aIN-MEMORY\u5b9e\u6218\uff081\uff09\u5f00\u542fINMEMORY"},"content":{"rendered":"<p>\u5f00\u542fINMEMORY\u6bd4\u8f83\u7b80\u5355\uff0c\u914d\u7f6einmemory_size\u3001inmemory_max_populate_servers\u8fd92\u4e2a\u53c2\u6570\u5373\u53ef\u751f\u6548\u3002<\/p>\n<p>inmemory_size\u8868\u793a\u5360\u7528\u5185\u5b58\u7684\u5927\u5c0f\uff0c\u53d6\u503c\u8303\u56f4100m-16G\u3002CDB\u3001PDB\u53ef\u4ee5\u72ec\u7acb\u914d\u7f6e\uff0cPDB\u7684inmemory_size\u7684\u603b\u548c\u4e0d\u80fd\u8d85\u8fc7CDB\u3002\u8bbe\u7f6e\u540e\u91cd\u542f\u751f\u6548\u3002<\/p>\n<p>inmemory_max_populate_servers \u662f\u7528\u4e8e\u8bbe\u7f6e\u5c06\u6570\u636e\u52a0\u8f7d\u5230\u5185\u5b58\u7684\u540e\u53f0\u8fdb\u7a0b\u6570\u91cf\uff0c\u5efa\u8bae\u53d6\u503c\u4e3a\u201cCPU_COUNT\u7684\u4e00\u534a\u201d\u4e0e\u201cPGA_AGGREGATE_TARGET\u9664\u4ee5512M\u201d\u4e2d\u7684\u8f83\u5c0f\u8005\u3002\u53ef\u4ee5\u9002\u5f53\u8c03\u6574\uff0c\u4f46\u6ce8\u610f\u4e0d\u8981\u5c06\u8be5\u53c2\u6570\u7684\u503c\u8bbe\u7f6e\u5f97\u592a\u9ad8\u3002\u5982\u679c\u5c06\u5176\u8bbe\u7f6e\u4e3a\u63a5\u8fd1CPU\u6570\u6216\u66f4\u9ad8\uff0c\u5219\u5c06\u6ca1\u6709CPU\u53ef\u4f9b\u7cfb\u7edf\u5176\u4ed6\u8fdb\u7a0b\u8fd0\u884c\u3002<br \/>\nsys\u7528\u6237\u4e0b\u7684\u5bf9\u8c61\u53caSYSTEM\u3001SYSAUX\u8868\u7a7a\u95f4\u4e0a\u7684\u5bf9\u8c61\u65e0\u6cd5\u4f7f\u7528IMO\u7279\u6027\uff0c\u4f46\u901a\u8fc7\u8bbe\u7f6e\u201c_enable_imc_sys\u201d\u9690\u542b\u53c2\u6570\u4e5f\u53ef\u4ee5\u4f7f\u7528\u3002<\/p>\n<pre><code class=\"language-sql\">SQL&gt; alter system set inmemory_size=100M scope=spfile;\n\nSystem altered.\n\nSQL&gt; alter system set inmemory_max_populate_servers=2;\n\nSystem altered.<\/code><\/pre>\n<p>\u5c06\u8868test1\u4eceinmemory\u4e2d\u5254\u9664<\/p>\n<pre><code class=\"language-sql\">SQL&gt; alter table test1 no inmemory;\n\nTable altered.\n\nSQL&gt;  select TABLE_NAME,INMEMORY_PRIORITY,INMEMORY_DISTRIBUTE,INMEMORY_COMPRESSION from user_tables where table_name=&#039;TEST1&#039;;\n\nTABLE_NAME           INMEMORY_PRIORITY        INMEMORY_D INMEMORY_COMPRESSION\n-------------------- ------------------------ ---------- ---------------------------------------------------\nTEST1\n<\/code><\/pre>\n<p>\u91cd\u542f\u540e\u67e5\u770bsga\uff0c\u5373\u53ef\u770b\u5230In-Memory Area\u7684\u503c\u3002<\/p>\n<pre><code class=\"language-sql\">SQL&gt; show sga\n\nTotal System Global Area 2818568848 bytes\nFixed Size                  9138832 bytes\nVariable Size             637534208 bytes\nDatabase Buffers         2046820352 bytes\nRedo Buffers                7634944 bytes\nIn-Memory Area            117440512 bytes<\/code><\/pre>\n<p>\u5c06\u8868\u653e\u5165\u5185\u5b58<\/p>\n<pre><code class=\"language-sql\">SQL&gt; create table test1 as select * from dba_objects;\n\nTable created.\n\nSQL&gt; alter table test1 inmemory;\n\nTable altered.<\/code><\/pre>\n<p>\u67e5\u770b\u8868\u662f\u5426\u5904\u4e8einmemory\u4e2d<\/p>\n<pre><code class=\"language-sql\">SQL&gt; select TABLE_NAME,INMEMORY_PRIORITY,INMEMORY_DISTRIBUTE,INMEMORY_COMPRESSION from user_tables where table_name=&#039;TEST1&#039;;\n\nTABLE_NAME           INMEMORY_PRIORITY        INMEMORY_D INMEMORY_COMPRESSION\n-------------------- ------------------------ ---------- ---------------------------------------------------\nTEST1                NONE                     AUTO       FOR QUERY LOW<\/code><\/pre>\n<p>\u53e6\u4e00\u4e2a\u6ca1\u6709inmemory\u7684\u8868\u5c31\u6ca1\u6709\u76f8\u5e94\u7684\u503c<\/p>\n<pre><code class=\"language-sql\">SQL&gt; select TABLE_NAME,INMEMORY_PRIORITY,INMEMORY_DISTRIBUTE,INMEMORY_COMPRESSION from user_tables where table_name=&#039;TEST&#039;;\n\nTABLE_NAME           INMEMORY_PRIORITY        INMEMORY_D INMEMORY_COMPRESSION\n-------------------- ------------------------ ---------- ---------------------------------------------------\nTEST<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u5f00\u542fINMEMORY\u6bd4\u8f83\u7b80\u5355\uff0c\u914d\u7f6einmemory<\/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-1212","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\/1212","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=1212"}],"version-history":[{"count":5,"href":"http:\/\/www.821121.com\/index.php?rest_route=\/wp\/v2\/posts\/1212\/revisions"}],"predecessor-version":[{"id":1223,"href":"http:\/\/www.821121.com\/index.php?rest_route=\/wp\/v2\/posts\/1212\/revisions\/1223"}],"wp:attachment":[{"href":"http:\/\/www.821121.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1212"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.821121.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1212"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.821121.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1212"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}