Database Tuning (MOSC)

MOSC Banner

Why use CASCADE=>'TRUE' for DBMS_STATS.GATHER_SCHEMA_STATS('HR') ?

edited May 9, 2023 12:01AM in Database Tuning (MOSC) 6 commentsAnswered

hi,


Why use CASCADE=>'TRUE' when using

exec DBMS_STATS.GATHER_SCHEMA_STATS('HR') 

the above will gather the statistics of all objects under HR schema, including indexes that belong to HR schema.


So below CASCADE=>TRUE is pointless, unless I have indexes in a different schema I guess (?)

exec DBMS_STATS.GATHER_SCHEMA_STATS('HR', CASCADE => TRUE)


Link to documentation where I read this


https://docs.oracle.com/en/database/oracle/oracle-database/19/arpls/DBMS_STATS.html#GUID-3B3AE30F-1A34-4BFE-A326-15048F7E904F


in documentation see

GATHER_SCHEMA_STATS Procedures description

This procedure gathers statistics

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center