What is an Index? Explain how to create an Index.
An index is a object which is used to improve performance during retrieval of records.
CREATE [UNIQUE] INDEX index_name
ON employee[emp_id, emp_name,dept_id]
The UNIQUE keyword is used when combined values of the index should be unique.
The COMPUTE STATISTICS during the creation of index optimizes the plan of execution of the SQL statement and improves performance.
What is Function-Based Index? Create a Function-Based Index
Instead of adding a index to a column, you index the function on that column.
CREATE INDEX sample_index on employee (UPPER(employee_name));
SELECT * FROM employee WHERE Upper(employee_name)='BILL';