Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.
Original topic: TiDB 是否支持Bit运算?
My requirement is to store massive user tag data, such as tagging multiple dimensions (within 1,000) for 100 million users. To quickly extract data, we expect the storage to be bitmap (or roaringbitmap):
- Record user set data on the tags;
- Record tag set data on the users, indicating which tags are assigned to the users;
I’m not sure about TiDB’s support for this. Planning to conduct a survey.
You can take a look at the implementation of MySQL, and then try TiDB.
Are you planning to store a fixed-length binary field for each database entry and then perform bitwise queries?
TiFlash late materialization can be supported. When there are filter conditions pushed down to the TableScan operator, the TableScan operator performs multi-version concurrency control (MVCC) filtering and generates an MVCC Bitmap. It reads the columns related to the filter conditions, filters the rows that meet the conditions, and generates a Filter Bitmap. The MVCC Bitmap and Filter Bitmap are then ANDed to generate the Final Bitmap. Based on the Final Bitmap, the corresponding rows of the remaining columns are read, and the data read from the Filter Bitmap and Final Bitmap are merged to return the result.
Haven’t played it, let’s see if any experts have.
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.