Oracle記憶體表的建立和使用

來源:互聯網
上載者:User

標籤:keep   base   select   tab   name   rom   echo   組成   user   

(create table 表名 (欄位) storage (buffer_pool keep); --建表時把表緩衝到KEEP中alter table 表名 storage(buffer_pool keep);--把已存在的表緩衝至KEEP中create table 表名(欄位..) storage (buffer_pool keep) cache;--建立緩衝表ALTER TABLE Table_Name STORAGE ( BUFFER_POOL KEEP) ;oracle的db_buffer_pool由三部分組成:buffer_pool_defualtbuffer_pool_keepbuffer_pool_recycle如果要把表釘死在記憶體中,也就是把表釘在keep區。 相關的命令為:alter table ..... storage(buffer_pool keep);這句命令把表示表如果緩衝的話是緩衝在keep區。可以通過語句:select table_name from dba_tables where buffer_pool=‘KEEP‘;查詢到改表是放在keep區中的。但是不意味著表已經被緩衝了。下面的語句把表緩衝:alter table .... cache;可以通過select table_name from dba_ tables where rtrim(cache)=‘Y‘查詢到該表已經被緩衝了。加入到keep區的表不是說不能被移出記憶體,不過是比較不容易移出記憶體。也可以手工來移出記憶體,命令如下:alter table ... nocache; 執行個體--select *from sms_accounts--alter table sms_accounts storage(BUFFER_POOL KEEP)--alter table ECHOBASE20110515 storage(BUFFER_POOL KEEP)--select table_name from dba_tables where buffer_pool=‘KEEP‘--alter table sms_accounts cache--alter table ECHOBASE20110515 cache--select table_name,cache from user_tables where table_name=‘ECHOBASE20110515‘--select table_name,cache from user_tables where table_name=‘SMS_ACCOUNTS‘

Oracle記憶體表的建立和使用

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.