Converting Analyze to DBMS_STATS statement
DBMS_GATHER_STATS
Before reinventing the wheel would like to check if anyone has already done listed below.
I would like to get translation of Analyze statement below using DBMS_STAT
select 'ANALYZE TABLE ' || owner || '.' || table_name || ' COMPUTE STATISTICS ; ' from dba_tables where owner = 'MY_OWN' and TABLE_NAME not in ('MY_REQ','MY_RES','MY_RES_AMT');
The above statment has tables/indexes which are partition and not partition (a mix).
Also below specific to partition tables:
select 'ANALYZE TABLE ' || owner || '.' || table_name || ' partition (P03) COMPUTE STATISTICS; ' from dba_tables where owner = 'MY_OWN' and TABLE_NAME in ('MY_REQ','MY_RES','MY_RES_AMT');
Before reinventing the wheel would like to check if anyone has already done listed below.
I would like to get translation of Analyze statement below using DBMS_STAT
select 'ANALYZE TABLE ' || owner || '.' || table_name || ' COMPUTE STATISTICS ; ' from dba_tables where owner = 'MY_OWN' and TABLE_NAME not in ('MY_REQ','MY_RES','MY_RES_AMT');
The above statment has tables/indexes which are partition and not partition (a mix).
Also below specific to partition tables:
select 'ANALYZE TABLE ' || owner || '.' || table_name || ' partition (P03) COMPUTE STATISTICS; ' from dba_tables where owner = 'MY_OWN' and TABLE_NAME in ('MY_REQ','MY_RES','MY_RES_AMT');
0