user_indexes 字典视图包含了索引名和唯一性,
user_ind_columns视图包含了索引名、表名、以及列名
dba_indexes dba_ind_columns 同理
select ix.table_owner, ic.table_name, ic.column_name, ic.index_name, ic.column_position, ix.uniqueness from dba_indexes ix, dba_ind_columns ic where ix.index_name = ic.index_name
基于函数的索引
SQL> create index upper_test_table_name_idx on test(UPPER(table_name)); Index created. 当查询中使用UPPER(table_name)作为条件时,就会使用索引;否则执行全表扫描 SQL> select * from test where upper(table_name)='SDO_TXN_IDX_DELETES'; TABLE_NAME ------------------------------ SDO_TXN_IDX_DELETES SDO_TXN_IDX_DELETES SDO_TXN_IDX_DELETES SDO_TXN_IDX_DELETES SDO_TXN_IDX_DELETES SQL>