Oracle bitmap Index

Source: Internet
Author: User


The Oracle bitmap index assumes that a table with rows has a field that is frequently used as a query condition. We will create an index on this column. However, this column may only have three values. If a B * tree index (Common Index) is created, a lot of data may be found no matter which value it looks. Then the bitmap index will be very suitable. If we create a BITMAP index in the job column of the emp table: SQL code www.2cto.com create BITMAP index job_idx on emp (job); The content stored by oracle in the index may be like this:
ANALYST, CLERK, MANAGER, PERSIDENT, and SALESMAN are all possible values in the job column. Only nine rows are listed above, and there may be more than 10 million rows. 1 indicates taking this value, and 0 indicates not taking it. For example, the value of Row 8 is ANALYST, and the first behavior is CLERK. At this time, if we want to find all the row data with the value of CLERK, it is easy to find out. Bitmap indexing is most suitable for data with low different base numbers. Low differences base numbers are 4000 rows of data, and 2 are different base numbers. There are only two rows of tables. Of course, 1 is not a different base. That is, if a column can only take a few values and the data volume of the table is large, this column is suitable for creating a bitmap index. Www.2cto.com uses Bitmap indexes for Data Warehouse and ad hoc queries. In addition, bitmap indexes are suitable for systems with high read density and are not suitable for systems with high write density. Because a row is modified, all rows (hundreds of rows) pointed to by the above bitmap index will be locked ). Because an index of a bitmap index points to multiple rows of data, rather than just one row of data as a normal index.
 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.