11.07.2015 Views

Oracle Database 11 g - Online Public Access Catalog

Oracle Database 11 g - Online Public Access Catalog

Oracle Database 11 g - Online Public Access Catalog

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

212 CHAPTER 4 ■ PERFORMANCE MANAGEMENT----------------------------------------| Id | Operation | Name |----------------------------------------| 0 | SELECT STATEMENT | || 1 | SORT ORDER BY | || 2 | TABLE ACCESS FULL | EMPLOYEES |----------------------------------------20 rows selected.SQL>As shown here, the function DISPLAY_SQL_PLAN_BASELINE displays and provides informationabout the baseline plans.Managing the SQL Management BaseThe optimizer is in charge of automatically managing the SQL management base (SMB), whichis part of the data dictionary and stores the statement log maintained by the optimizer. TheSMB also stores the SQL plan histories and the SQL plan baselines. Unlike the data dictionary,which is stored in the system tablespace, the database stores the SMB in the sysaux tablespace.You can configure the SMB to occupy anywhere between 1 and 50 percent of the size of thesysaux tablespace; the default allocation is 10 percent. A background process that runs once aweek will issue an alert if the SMB exceeds its space allocation. You can increase the space allocationpercentage, increase the size of the sysaux tablespace, or purge SQL plan baselines andSQL profiles from the SMB to make more room for new data.Use the new view DBA_SQL_MANAGEMENT_CONFIG to see the configuration parametersof the SQL management base. There are two configuration parameters you can modify, space_budget_percent and plan_retention_weeks. The space_budget_percent parameter shows thecurrent SMB space limit in the sysaux tablespace, and the plan_retention_weeks parametershows how long the database will retain the data in the SMB before automatically purging it.You can view the current values for both of these parameters by issuing the following statement:SQL> select parameter, parameter_value from dba_sql_management_config;PARAMETERPARAM_VALUE------------------------------------ -------------------SPACE_BUDGET_PERCENT 10PLAN_RETENTION_WEEKS 53SQL>This query shows the default values for the two configuration parameters related to the SQLmanagement base. The database will retain unused plans for 53 weeks before purging them.You can also purge individual plans with the help of the purge_sql_plan_baseline function.You can change either of the two configuration parameters by using the configure procedureof the new DBMS_SPM package. The following example shows how to change the setting for thespace_budget_percent parameter:

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!