How to cache tables to memory in oracle

Source: Internet
Author: User

How to cache tables in oracle to memory because some static data tables are frequently accessed in the database, you can consider caching these tables with a small amount of data to the memory. There are two methods: for example, cache the fisher table to the memory.

1) alter table fisher cache; 2) alter table fisher storage (buffer_pool keep); -- Cancel cache 1) alter table fisher nocache; 2) alter table fisher storage (buffer_pool default ); select table_name, OWNER, cache, buffer_pool from dba_tables where table_name = 'fisher '; -- check whether the select * from dba_segments where segment_name = 'fisher' is cached; -- view the table size

 

Difference between the two: 1) cache caches the table to the share pool. This operation directly caches the hot end of the table and is controlled by the LRU algorithm. 2) cache the table to a fixed memory space. By default, the buffer_pool space is 0 ,. You need to manually set the space size.
Alter system set db_keep_cache_size = 50 M scope = both sid = '*';

 


Related Article

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.