Thursday, July 11, 2013

BTREE v/s BITMAP indexes


btree index

when the values in a particular coulumn is all diffrenet or have
large variance,then b tree index is usefull
this is based on concept of branch block and leaf block
branch block has condition and pointer,pointer will either pints to next condition or the rowid.
leaf block has rowid and data.

bitmap index
when the data in particular coulumn is repitative
eg sex field it has value only as male or female
in such case its not good to create b tree index.
bitmap index is use full there.
its will be like following

male 0 1 0 0 0 0 0 0 0 0 0 0

female 1 0 1 1 1 1 1 1 1 1 1 1