Oracle table resident memory

Source: Internet
Author: User


(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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.