MERCADOS FINANCIEROS

jueves, 21 de marzo de 2019

ESTADISTICAS TABLAS & INDICES ORACLE

SQL> execute dbms_stats.gather_table_stats('HR','EMPLOYEES');

PL/SQL procedure successfully completed.

SQL>  execute dbms_stats.gather_index_stats('HR','EMP_EMAIL_UK');

PL/SQL procedure successfully completed.

SQL>execute dbms_stats.gather_schema_stats('HR');


VALIDAR SQL FECHA EJECUCION ESTADISTICAS TABLAS

select table_name,num_rows,avg_row_len,last_analyzed from dba_tables where owner='HR';

select index_name,num_rows,avg_row_len,last_analyzed from dba_indexes where owner='HR';

SCRIPT DINAMICO ESTADISTICAS INDICES

select 'execute dbms_stats.gather_index_stats(' || '''' || table_owner || '''' || ',' ||  '''' || index_name || '''' || ');' from dba_indexes 
where table_name='FOR_DOCS_TAREADOCS'

No hay comentarios: