I have a table with 1 million records out of which 10,000 records are of unique records, then if I will implement index, then which type of index shall I use and why shall I use?

Answer Posted / mrityunjay singh

Fully indexing a large table with a traditional B-tree index can be prohibitively expensive in terms of disk space because the indexes can be several times larger than the data in the table. Bitmap indexes are typically only a fraction of the size of the indexed data in the table.

An index provides pointers to the rows in a table that contain a given key value. A regular index stores a list of rowids for each key corresponding to the rows with that key value. In a bitmap index, a bitmap for each key value replaces a list of rowids.

Each bit in the bitmap corresponds to a possible rowid, and if the bit is set, it means that the row with the corresponding rowid contains the key value. A mapping function converts the bit position to an actual rowid, so that the bitmap index provides the same functionality as a regular index. Bitmap indexes store the bitmaps in a compressed way. If the number of distinct key values is small, bitmap indexes compress better and the space saving benefit compared to a B-tree index becomes even better.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is meant by urlencode and urldocode? : Sql dba

674


Why we use cross join?

625


How do you modify a column in sql?

643


How do temporal tables work?

607


What are the operators in sql?

622






How is a process of pl/sql compiled?

691


Which join condition can be specified using on clause?

608


What is the use of <> sql?

644


What is on delete set null?

654


How are functions and procedures called in PL/SQL?

689


how many ways we can we find the current date using mysql? : Sql dba

714


Why join is faster than subquery?

695


What is varchar used for?

645


how would concatenate strings in mysql? : Sql dba

651


Can we create table inside stored procedure?

609