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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.