Middle
What types of indexes are there in Oracle and which ones have you used?
sobes.tech AI
Answer from AI
In Oracle, there are several types of indexes used to optimize queries:
- B-tree index — the most common type, suitable for equality and range queries. A standard balanced tree.
- Bitmap index — effective for columns with low cardinality (few unique values), often used in analytical systems.
- Clustered index — an index that determines the physical order of rows in a table (implemented in Oracle through indexed tables).
- Function-based index — an index on an expression or function of a column, allowing faster queries with functions.
- Reverse key index — reverses the bytes of the key to reduce locking during inserts into sequential keys.
- Domain index — user-defined indexes for specific data types (e.g., text, spatial).
Which ones have you used:
- B-tree — for most main tables and columns with high cardinality.
- Bitmap — for analytical tables with columns that have few unique values (e.g., gender, status).
- Function-based — to speed up queries with functions, e.g., indexing UPPER(col).
The choice of index depends on the nature of the data and queries.