Tutorial by Examples

CREATE INDEX ord_customer_ix ON orders (customer_id); By default, if we do not mention anything, oracle creates an index as a b-tree index. But we should know when to use it. B-tree index stores data as binary tree format. As we know that, index is a schema object which stores some sort of entry...
CREATE BITMAP INDEX emp_bitmap_idx ON index_demo (gender); Bitmap index is used when data cardinality is low. Here, Gender has value with low cardinality. Values are may be Male, Female & others. So, if we create a binary tree for this 3 values while searching it will have unnecessary ...
CREATE INDEX first_name_idx ON user_data (UPPER(first_name)); SELECT * FROM user_data WHERE UPPER(first_name) = 'JOHN2'; Function based index means, creating index based on a function. If in search (where clause), frequently any function is used, it's better to create index based on ...

Page 1 of 1