Full database buffer mode of new performance optimization features in Oracle 12cR1

 

Normally, Oracle decides which data will stay in the buffer. When there is not enough space, the data is written out of memory. In addition, in order to avoid a large number of reads that squeeze useful information out of the buffer, Oracle may take measures to bypass the buffer for some operations. Oracle12cR1 (12.1.0.2) introduced the concept of full data buffering. If Oracle thinks the buffer is large enough to hold the entire database, then it will buffer all data blocks. Additionally, full data buffering mode can be forced.

1. Enforce full database buffering mode

Instead of letting Oracle decide whether to enable full database buffering mode, you can force the mode to be enabled through the ALTER DATABASE command.

To force this mode on, you need to close and put the library in the mount state first, otherwise, executing the ALTER DATABASE command on an open database will report an error.

SQL>ALTER DATABASE FORCE FULL DATABASE CACHING;

ALTERDATABASE FORCE FULL DATABASE CACHING

*

ERRORat line 1:

ORA-01126:database must be mounted in this instance and not open in any

instance

 

SQL>

 

CONN/ AS SYSDBA

SHUTDOWNIMMEDIATE;

STARTUPMOUNT;

ALTERDATABASE FORCE FULL DATABASE CACHING;

ALTERDATABASE OPEN;

Then, query the V$DATABASE view to see the modified results.

SELECTforce_full_db_caching FROM v$database;

 

FOR

---

YES

 

SQL>

2. Forcibly disable full database buffering mode

Forcing the full database buffering mode to be disabled is similar to forcing it to be enabled.

CONN/ AS SYSDBA

SHUTDOWNIMMEDIATE;

STARTUPMOUNT;

ALTERDATABASE NO FORCE FULL DATABASE CACHING;

ALTERDATABASE OPEN;

Modified changes can also be seen by looking at the V$DATABASE view.

SELECTforce_full_db_caching FROM v$database;

 

FOR

---

NO

 

SQL>

3. Pay attention

1) The COMPATIBLE parameter must be set to 12.0.0 or higher.

2) If you are using AMM or ASMM, the buffer size may be adjusted so that the buffer is too small for the entire database. It is necessary to adjust the memory parameter or DB_CACHE_SIZE parameter to a slightly larger correct value.

3) Data objects are not preloaded into the buffer, but are loaded as they are accessed.

4) When the full database buffering mode is forcibly turned on, the LOB data defined as non-buffering will also be buffered. In the normal mode, these LOB data will not be buffered.

5) When using the multi-homed library option, forcing full database buffering mode will work for multiple CDBs and all PDBs.

6) If you need to restore the control file, you should first check whether the full database buffer mode is enabled.

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326124844&siteId=291194637