Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Doc] Bitmap explanation is incorrect #43110

Closed
wants to merge 1 commit into from

Conversation

believerHan
Copy link

@believerHan believerHan commented Mar 26, 2024

Why I'm doing:

What I'm doing:

Fixes #issue

What type of PR is this:

  • BugFix
  • Feature
  • Enhancement
  • Refactor
  • UT
  • Doc
  • Tool

Does this PR entail a change in behavior?

  • [] Yes, this PR will result in a change in behavior.
  • No, this PR will not result in a change in behavior.

If yes, please specify the type of change:

  • Interface/UI changes: syntax, type conversion, expression evaluation, display information
  • Parameter changes: default values, similar parameters but with different default values
  • Policy changes: use new policy to replace old one, functionality automatically enabled
  • Feature removed
  • Miscellaneous: upgrade & downgrade compatibility, etc.

Checklist:

  • I have added test cases for my bug fix or my new feature
  • This pr needs user documentation (for new or modified features or behaviors)
    • I have added documentation for my new feature or new function
  • This is a backport pr

Bugfix cherry-pick branch check:

  • I have checked the version labels which the pr will be auto-backported to the target branch
    • [] 3.2
    • 3.1
    • 3.0
    • 2.5

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@github-actions github-actions bot added documentation Improvements or additions to documentation title needs [type] labels Mar 26, 2024
@believerHan believerHan changed the title Bitmap explanation is incorrect [Doc] Bitmap explanation is incorrect Mar 26, 2024
@believerHan believerHan reopened this Mar 26, 2024
@@ -11,13 +11,13 @@ Bitmap 索引是一种使用 bitmap 的特殊数据库索引。bitmap 即为一

Bitmap 索引能够提高指定列的查询效率。如果一个查询条件命中列,StarRocks 即可使用[前缀索引](./Prefix_index_sort_key.md)提高查询效率,快速返回查询结果。但是前缀索引的长度有限,如果想要提高一个非前缀索引列的查询效率,即可以为这一列创建 Bitmap 索引。

Bitmap 索引一般适用于高基数列,基于列构建的 Bitmap 索引的选择性高,并且使用 Bitmap 索引后能筛选出较少数据行的场景。
Bitmap 索引一般适用于低基数列,基于列构建的 Bitmap 索引的选择性高,并且使用 Bitmap 索引后能筛选出较少数据行的场景。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, the document is correct.
We want users to create a bitmap index for high cardinality columns.
Suppose creating a bitmap index for a sex column that just has male/female, half of the records will be read. In that case, the query performance can not be accelerated by the index.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I looked at the 2.5 version documentation and Wikipedia, and it says bitmap is suitable for low cardinality. The example on your official website is also a low-base example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.2 documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants