A key is a column or expression on which you can build an index. Follow these guidelines for choosing keys to index:
WHERE clauses.|
Note: Oracle automatically creates indexes, or uses existing indexes, on the keys and expressions of unique and primary keys that you define with integrity constraints. |
Indexing low selectivity columns can be helpful if the data distribution is skewed so that one or two values occur much less often than other values.
UPDATE statements that modify indexed columns and INSERT and DELETE
statements that modify indexed tables take longer than if there were no
index. Such SQL statements must modify data in indexes as well as data
in tables. They also generate additional undo and redo.WHERE clauses with functions or operators. A WHERE clause that uses a function, other than MIN or MAX,
or an operator with an indexed key does not make available the access
path that uses the index except with function-based indexes.INSERT, UPDATE, and DELETE statements access the parent and child tables. Such an index allows UPDATEs and DELETEs on the parent table without share locking the child table.INSERTs, UPDATEs, and DELETEs
and the use of the space required to store the index. You might want to
experiment by comparing the processing times of the SQL statements with
and without indexes. You can measure processing time with the SQL trace
facility.来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/94317/viewspace-796600/ ,如需转载,请注明出处,否则将追究法律责任。