1.前言。
如題。2.如何常駐記憶體
摘自:
(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_defualt
buffer_pool_keep
buffer_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表常駐記憶體
create table 表名 字段 storage buffer pool keep 建表時把表快取到keep中 alter table 表名 storage buffer pool keep 把已存在的表快取至keep中 create table 表名 欄位.storage buffer poo...
Android如何讓APP程序常駐記憶體?
目前google已經意識到這些問題,所以在android n中取消了action new picture,connectivity action等廣播。這種程序保活方式非常簡單,就是採用系統介面,啟動前台service,這樣你會在通知欄看到乙個notification,讓使用者明確的感知到你在執行中...
安卓按返回鍵讓App常駐記憶體
在你的activity裡監聽返回按鈕的事件,然後執行等價於按home鍵的操作 方法一 override public void onbackpressed 方法二 按返回鍵時不銷毀當前activity 將activity退到後台,而不直接finish退出 引數為false代表只有當前activity...