BEGIN
FOR REC IN (SELECT index_name FROM user_indexes WHERE TABLE_OWNER NOT LIKE 'SYS')
LOOP
EXECUTE IMMEDIATE 'begin dbms_stats.gather_index_stats(user,:b1); end;' using REC.index_name;
END LOOP;
END;
-- CHECK REINDEX --
SELECT index_name, index_type, table_name, uniqueness, num_rows, last_analyzed
FROM user_indexes;
Nenhum comentário:
Postar um comentário