bitmap heap scan
来源:互联网 发布:人工智能与人类智慧 编辑:程序博客网 时间:2024/05/22 10:00
6 "Bitmap Heap Scan" 解释
A plain indexscan fetches one tuple-pointer at a time from the index,
and immediately visits that tuple in the table. A bitmap scan fetches
all the tuple-pointers from the index in one go, sorts them using an
in-memory "bitmap" data structure, and then visits the table tuples in
physical tuple-location order. The bitmap scan improves locality of
reference to the table at the cost of more bookkeeping overhead to
manage the "bitmap" data structure --- and at the cost that the data
is no longer retrieved in index order, which doesn't matter for your
query but would matter if you said ORDER BY.
上面的意思是说,普通的索引扫描( index scan) 一次只读一条索引项,那么
一个 PAGE面有可能被多次访问;而 bitmap scan 一次性将满足条件的索引项全部取
A plain indexscan fetches one tuple-pointer at a time from the index,
and immediately visits that tuple in the table. A bitmap scan fetches
all the tuple-pointers from the index in one go, sorts them using an
in-memory "bitmap" data structure, and then visits the table tuples in
physical tuple-location order. The bitmap scan improves locality of
reference to the table at the cost of more bookkeeping overhead to
manage the "bitmap" data structure --- and at the cost that the data
is no longer retrieved in index order, which doesn't matter for your
query but would matter if you said ORDER BY.
上面的意思是说,普通的索引扫描( index scan) 一次只读一条索引项,那么
一个 PAGE面有可能被多次访问;而 bitmap scan 一次性将满足条件的索引项全部取
出,并在内存中进行排序, 然后根据取出的索引项访问表数据。
普通索引一次读取一条索引项,个人是这样理解 先读取索引建到内存比较 发现相等 则读取对应的实际 数据的指针(数据位置值)到内存 在根据这个指针读取数据
位图索引 一次读取所有的索引的指针值 (根据所有记录的0,1,0)
(扫描数据 不在按照索引顺序 而是按照 位图中为1 的顺序)
0 0
- bitmap heap scan
- Scan line of Bitmap
- PostgreSQL index scan,bitmap index scan区别
- android Bitmap分配在java heap还是native heap
- 【数据结构】堆heap,Trie树,位图Bitmap
- scan
- Scan
- PostgreSQL index scan enlarge heap page scans when index and column correlation small
- Heap
- Heap
- heap
- Heap
- heap
- heap
- heap
- Heap
- heap
- Heap
- Scala学习8之排序算法比较和实现(scala)
- BZOJ_P1529 [POI2005]ska Piggy banks(并查集)
- C++作业2
- Java实现给图片添加水印
- 中文 iOS/Mac 开发博客列表
- bitmap heap scan
- ROS_OpenCV2_MatchTemplate模板匹配
- 加密算法类型
- leetcode 38. Count and Say
- 17 对象的使用(二)
- 网络规划的需求分析
- mysql数据库命令
- C++对C语言的扩展
- [bzoj2594][WC2006]水管局长数据加强版