ANALYZE INDEX index_name COMPUTE STATISTICS;
ANALYZE INDEX index_name VALIDATE STRUCTURE;
COMPUTE STATISTICS:
VALIDATE STRUCTURE:
SQL> analyze index pk_emp validate structure; Index analyzed. SQL> select name from index_stats; NAME ------------------------------ PK_EMP SQL> analyze index pk_dept validate structure; Index analyzed. SQL> select name from index_stats; NAME ------------------------------ PK_DEPT SQL> disconnect; Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Production With the Partitioning, OLAP and Data Mining options SQL> conn scott/tiger Connected. SQL> analyze index pk_emp validate structure; Index analyzed. SQL> analyze index pk_dept validate structure; Index analyzed. SQL> select name from index_stats; NAME ------------------------------ PK_DEPTonline/offline option Test
SQL> conn scott/tiger Connected. SQL> analyze index pk_emp validate structure online; Index analyzed. SQL> select count(1) from index_stats; COUNT(1) ---------- 0 SQL> analyze index pk_emp validate structure offline; Index analyzed. SQL> select count(1) from index_stats; COUNT(1) ---------- 1
No comments:
Post a Comment