(Create TABLE table name (field) storage (Buffer_pool keep); --cache the table to keep in the table name storage (Buffer_pool keep);--caches existing tables to keep CREATE TABLE table name (field: ) Storage (Buffer_pool Keep) cache;--create cache table ALTER TABLE TABLE_NAME storage (Buffer_pool keep); Oracle's Db_buffer_pool is made up of three parts : buffer_pool_defualtbuffer_pool_keepbuffer_pool_recycle If the table is to be nailed to memory, the table is nailed to the keep area. The related commands are: ALTER TABLE ... storage (buffer_pool keep); This command puts the expression table if the cache is cached in the Keep area. You can pass the statement: SELECT table_name from dba_tables where buffer_pool= ' KEEP '; the query to the ALTER TABLE is placed in the KEEP area. But it doesn't mean that the table is already cached. The following statement caches the table: ALTER TABLE ... cache; can be queried by select table_name from Dba_ tables where RTRIM (cache) = ' Y ' to the table is already cached. The tables added to the keep area are not said to be moved out of memory, but are relatively hard to move out of memory. You can also manually move the memory out of the command 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 '
Creation and use of Oracle memory tables