(Create table Name (field) storage (buffer_pool keep); -- cache the table to the KEEP when creating the table. alter table name storage (buffer_pool keep ); -- cache the existing table to the create table name (field...) in the KEEP ..) storage (buffer_pool keep) cache; -- creates the cache table alter table Table_Name STORAGE (BUFFER_POOL KEEP); The db_buffer_pool of oracle is composed of three parts: If you want to pin the TABLE to the memory, that is, pin the table in the keep area. Related commands: alter table... storage (buffer_pool keep); this command indicates that if the table is cached, It is cached in the keep area. You can run the following statement: select table_name from dba_tables where buffer_pool = 'keep '; query that the modified table is in the KEEP area. But it does not mean that the table has been cached. The following statement caches the table: alter table .... cache; you can use select table_name from dba _ tables where rtrim (cache) = 'y' to query whether the table has been cached. The table added to the keep area does not mean that it cannot be removed from the memory, but is not easy to remove from the memory. You can also manually remove the memory. The command is as follows: alter table... nocache; instance -- 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'
Author juji1010