当前位置:网站首页>phoenix索引
phoenix索引
2022-06-25 22:02:00 【bingoabin】
1. 介绍
二级索引这个特性应该是大部分用户引入Phoenix主要考虑的因素之一。HBase因其历史原因只支持rowkey索引,当使用rowkey来查询数据时可以很快定位到数据位置。现实中,业务查询需求条件往往比较复杂,带有多个查询字段组合,如果用HBase查的话,只能全表扫描进行过滤,效率很低。而Phoenix支持除rowkey外的其它字段的索引创建,即二级索引,查询效率可大幅提升。
- 为什么需要用二级索引?
- 对于HBase而言,如果想精确地定位到某行记录,唯一的办法是通过rowkey来查询。如果不通过rowkey来查找数据,就必须逐行地比较每一列的值,即全表扫瞄。对于较大的表,全表扫描的代价是不可接受的。但是,很多情况下,需要从多个角度查询数据。例如,在定位某个人的时候,可以通过姓名、身份证号、学籍号等不同的角度来查询,要想把这么多角度的数据都放到rowkey中几乎不可能(业务的灵活性不允许,对rowkey长度的要求也不允许)。所以,需要secondary index(二级索引)来完成这件事。secondary index的原理很简单,但是如果自己维护的话则会麻烦一些。现在,Phoenix已经提供了对HBase secondary index的支持。
2. Phoenix Global Indexing And Local Indexing
- 2.1 Global Indexing
- Global indexing,全局索
边栏推荐
- Reproduction of an implant found by Kaspersky that writes shellcode into evenlog
- Rk3568+ Hongmeng industrial control board industrial gateway video gateway solution
- 关于go中资源泄漏/goroutine泄漏/内存泄漏/CPU打满等情况分析
- Solving typeerror: Unicode objects must be encoded before hashing
- CSDN添加页内跳转和页外指定段落跳转
- Konva series tutorial 2: drawing graphics
- Go language escape analysis complete record
- golang Make a list of intervals with sequential numbers
- Classic image segmentation network: UNET supports libtorch deployment reasoning [with code]
- 28 rounds of interviews with 10 companies in two and a half years (including byte, pinduoduo, meituan, Didi...)
猜你喜欢

CSDN添加页内跳转和页外指定段落跳转

先序线索二叉树

24class static member

Pointer strengthening and improvement

konva系列教程2:绘制图形

Leetcode-1528- rearrange string - hash table - string

UE4 learning records create a role and control its movement

When are the three tools used for interface testing?

What is Unified Extensible Firmware Interface (UEFI)?

UE4 学习记录二 给角色添加骨架,皮肤,及运动动画
随机推荐
Day3 data types and operators summary and job
hiberate核心API/配置文件/一级缓存详解
213.打家劫舍 II
Qt自定义实现的日历控件
中序线索二叉树
Screen recording to GIF is an easy-to-use gadget, screentogif, which is free and easy to use!
Kotlin null pointer bug
Qlabel text scrolling horizontally
24class static member
YUV444、YUV422、YUV420、YUV420P、YUV420SP、YV12、YU12、NV12、NV21
QT custom implemented calendar control
库项目和App项目中清单文件的包名不要相同
Count the number of different palindrome subsequences in the string
我的vscode
第五章 习题(124、678、15、19、22)【微机原理】【习题】
音频基础知识以及PCM转WAV
excel如何实现中文单词自动翻译成英文?这个公式教你了
Reproduction of an implant found by Kaspersky that writes shellcode into evenlog
UE4 learning record 2 adding skeleton, skin and motion animation to characters
转载: QTableWidget详解(样式、右键菜单、表头塌陷、多选等)