Monday, August 16, 2010

Oracle 11g: Indexes

How Indexes Being Created?
  • Automatically
    • When we created Primary Key 
  • Manually
Guidelines To Create Index
  • A column has wide range values
  • A column has large number of null values
  • One or more columns are frequently used together (Clause/Join Condition) 
  • Large Table

===>  SQL Queries:  Create New Index
create index emp_last_name_idx
on employees(last_name);

Results
create index succeeded.


===> SQL Queries:  Removing an Index
drop index emp_last_name_idx;


Results:

drop index emp_last_name_idx succeeded.

No comments: