Sequences are used to give sequence/sequence numbers (w.r.t unique) to the inserted records. The sequence will be based on start and end values. But indexing means, it will place the record in the correct location (w.r.t reference location). Indexes are useful for large amount of data.
(SCJP5.0, IBM Rational Solution Designer, IBM Rational Architect, IBM RUP Designer)
An index is a performance-tuning method of allowing faster retrieval of records. An index creates an entry for each value that appears in the indexed columns. By default, Oracle creates B-tree indexes.
Create an Index
The syntax for creating a index is:
CREATE [UNIQUE] INDEX index_name
ON table_name (column1, column2, . column_n)
[ COMPUTE STATISTICS ];
UNIQUE indicates that the combination of values in the indexed columns must be unique.
COMPUTE STATISTICS tells Oracle to collect statistics during the creation of the index. The statistics are then used by the optimizer to choose a "plan of execution" when SQL statements are executed.
In Oracle, you can create an autonumber field by using sequences. A sequence is an object in Oracle that is used to generate a number sequence. This can be useful when you need to create a unique number to act as a primary key.