Skip to main content

Posts

Showing posts from 2017

SQL Plan Management [ SPM ]

============================================= SQL> SHOW parameter baselines NAME                                 TYPE        VALUE ------------------------------------ ----------- ------- optimizer_capture_sql_plan_baselines boolean     FALSE optimizer_use_sql_plan_baselines     boolean     TRUE SQL> ============================================= Connect as SPM user and create a table as follows. -------------------------------------------------- SQL> CREATE TABLE EMPLOYEE (code number,dept char(100),address char(1000)); Table created. SQL> ============================================= Populate some rows in the table =================================== declare c1 number; begin for c1 IN 1..10000 ...

Create ==> Gather ==> Export ==> Delete ==> Import Schema Statistics

================================================================================== create a table to hold the statistics ---------------------------------------- SQL> exec dbms_stats.create_stat_table(ownname => 'SYS', stattab => 'stats'); PL/SQL procedure successfully completed. SQL> ================================================================================== SQL> DESC SYS.stats  Name                                      Null?    Type  ----------------------------------------- -------- ----------------------------  STATID                                     ...