Enable incremental stats collection in Oracle

Enable incremental statistics collection in Oracle

Check the status of incremental pref

SQL> select dbms_stats.get_prefs('INCREMENTAL', tabname=>'EMPLOYEES',  ownname=>'HR') from dual;

DBMS_STATS.GET_PREFS('INCREMENTAL',TABNAME=>'EMPLOYEES',OWNNAME=>'HR')
-----------------------------------------------------------------------
FALSE

Enable incremental stats collection

SQL> exec DBMS_STATS.SET_TABLE_PREFS('HR','EMPLOYEES','INCREMENTAL','TRUE');

PL/SQL procedure successfully completed.

Check the pref again:

SQL> select dbms_stats.get_prefs('INCREMENTAL', tabname=>'EMPLOYEES', ownname=>'HR') from dual;

DBMS_STATS.GET_PREFS('INCREMENTAL',TABNAME=>'EMPLOYEES',OWNNAME=>'HR')
------------------------------------------------------------------------
TRUE

This entry was posted in Oracle on by .
Unknown's avatar

About SandeepSingh

Hi, I am working in IT industry with having more than 15 year of experience, worked as an Oracle DBA with a Company and handling different databases like Oracle, SQL Server , DB2 etc Worked as a Development and Database Administrator.

Leave a Reply