| < Day Day Up > |
|
Oracle recommends using the DBMS_STATS package to generate statistics with the latest version of Oracle. A similar type of script can be created using the DBMS_STATS package.
set termout off echo off feed off trimspool on head off pages 0; spool c:\tmp\statistics.sql; select 'analyze '||object_type||' '||object_name||' compute statistics;' from user_objects where object_type in ('TABLE','INDEX') order by object_type,object_name; spool off; set termout on; @@c:\tmp\statistics.sql; exit;
| < Day Day Up > |
|