Creation and use of Oracle memory tables

Source: Internet
Author: User

(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

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.