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 = '*';