Oracle

CREATE INDEX

Figo Kim 2006. 11. 26. 11:59
336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.
- Create an index on one or more columns:
Syntax)
CREATE INDEX index
ON table (column[,column]...);

ex)
CREATE INDEX emp_last_name_idx
ON employees(last_name);
  • Create an index when:
    - A column contains a wide range of values
    - A column contains a large number of null values
    - One or more columns are frequently used together in a WHERE clause or a join condition
    - The table is large and most queries are expected to retrieve less than 2% to 4% of the rows in the table.
  • Do not create an index when:
    - The columns are not often used as condition in the query.
    - The table is small or most queries are expected to retrieve more than 2% to 4% of the rows in the table
    - The table is updated frequently
    - The indexed columns are referenced as part of an expression

- You cannot midify indexes. ( Drop -> create)
** If you drop ta table, indexes and constraints are automatically dropped but views and sequences remain.

'Oracle' 카테고리의 다른 글

Synonyms  (0) 2006.11.26
Synonyms  (0) 2006.11.26
CREATE INDEX  (0) 2006.11.26
INDEXES  (0) 2006.11.26
INDEXES  (0) 2006.11.26