analyze index validate structure
SQL>
SQL>
SQL> set serveroutput on
SQL> set echo on
SQL> create table t ( x int, y int );
Table created.
SQL> create unique index t_idx on t(x,y);
Index created.
SQL> insert into t values ( 1, 1 );
1 row created.
SQL> insert into t values ( 1, NULL );
1 row created.
SQL> insert into t values ( NULL, 1 );
1 row created.
SQL> insert into t values ( NULL, NULL );
1 row created.
SQL> analyze index t_idx validate structure;
Index analyzed.
SQL> select name, lf_rows from index_stats;
NAME LF_ROWS
-------------------- ----------
T_IDX 3
1 row selected.
SQL> insert into t values ( NULL, NULL );
1 row created.
SQL> insert into t values ( NULL, 1 );
SQL> insert into t values ( 1, NULL );
SQL> select x, y, count(*) from t group by x,y having count(*) > 1;
X Y COUNT(*)
---------- ---------- ----------
2
1 row selected.
SQL>
SQL> drop table t;
Table dropped.
SQL> drop index t_idx;
SQL>
SQL> --
Related examples in the same category