Index Files and B+ Tree Refinements(听课笔记)

General characteristics of an index : An Outline

Issue to consider in any index structure(not just B+-trees)

  • Query support : what class of queries does the index allow?
  • Choice of Search Key(Affects the queries for which we can use an index)
  • Data Entry Storage(Affects performance of the index)
  • Variable -length key tricks (Affects performance of the index)
  • Cost Model for Index vs Heap vs Stored File

Query support

 

Part 3 Composite Search Keys in One Dimension

Search Key and Ordering

 

 

 

 

 

 

 

 

 Data Entry Storage Intro

  • What is the representation of data in the index?(Actual data or pointer to the data)
  • How is the data stored in the data file?(Clustered or unclustered with respect to the index)
  • Big Impact on Performance

 Three basic alternatives for data entries in any index

  • Three basic alternatives for data entries in any index
  1. Alternative 1: By Value
  2. Alternative 2: By Reference
  3. Alternative 3: By List of references

Alternative 1 Index (B+ Tree)

Record content are stored in the index file

No need to follow pointers

Alternative 2 Index

Alternative 2: By Reference , <k, rid of matching data record>

We used in slides above.

Alternative  3 Index

Alternative 3: By List of references , <k, list of rids of matching data records>

Alternative 3 more compact than alternative 2

For very large rid lists ,single data entry spans multiples blocks.

Indexing By Reference

Both Alternative 2 and Alternative 3 index data by reference

By-reference is required to support multiple indexes per table

Otherwise we would be replicating entire tuples

Replicating data leads to complexity when we're doing updates ,so it's something we want to avoid.

 Part 5 Clustered vs Unclustered Indexes

 

 

 

 

 Part6 Variable Length Keys : Occupancy and Compression

 

 

 

 

 

 

 

 

 

 

Lec8 Part1 Intro to Buffer Management

 

 

 

 

 

 

 

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值