【Database System Concept 7th】Chapter 14 Indexing 读书笔记

Chapter 14 Indexing

  • [14.1 Basic Concepts](#14.1 Basic Concepts)
  • [14.2 Ordered Indices](#14.2 Ordered Indices)
    • [14.2.1 Dense and Sparse Indices](#14.2.1 Dense and Sparse Indices)
    • [14.2.2 Multilevel Indices](#14.2.2 Multilevel Indices)
    • [14.2.3 Index Update](#14.2.3 Index Update)
    • [14.2.4 Secondary Indices](#14.2.4 Secondary Indices)
    • [14.2.5 Indices on Multiple Keys](#14.2.5 Indices on Multiple Keys)
  • [14.3 B+-Tree Index Files](#14.3 B+-Tree Index Files)
    • [14.3.1 Structure of a B+-Tree](#14.3.1 Structure of a B+-Tree)
    • [14.3.2 Queries on B+-Trees](#14.3.2 Queries on B+-Trees)
    • [14.3.3 Updates on B+-Trees](#14.3.3 Updates on B+-Trees)
    • [14.3.4 Complexity of B+-Tree Updates](#14.3.4 Complexity of B+-Tree Updates)
    • [14.3.5 Nonunique Search Keys](#14.3.5 Nonunique Search Keys)
  • [14.4 B+-Tree Extensions](#14.4 B+-Tree Extensions)
    • [14.4.1 B+-Tree File Organization](#14.4.1 B+-Tree File Organization)
    • [14.4.2 Secondary Indices and Record Relocation](#14.4.2 Secondary Indices and Record Relocation)
    • [14.4.3 Indexing Strings](#14.4.3 Indexing Strings)
    • [14.4.4 Bulk Loading of B+-Tree Indices](#14.4.4 Bulk Loading of B+-Tree Indices)
    • [14.4.5 B-Tree Index Files](#14.4.5 B-Tree Index Files)
    • [14.4.6 Indexing on Flash Storage](#14.4.6 Indexing on Flash Storage)
    • [14.4.7 Indexing in Main Memory](#14.4.7 Indexing in Main Memory)
  • [14.5 Hash Indices](#14.5 Hash Indices)

14.1 Basic Concepts

众所周知,索引就是用于加快检索滴,就像书的目录一样,维护了主题到页数的映射 ,我们通过某个关键字查找主题 ,然后再跳转到某一页 进行内容的查看。本章主要介绍一些常见的索引技术,主要是Hash索引B+tree索引 ,在本节让我们先了解一些基本概念。

有两种基本的索引类型:

  • 顺序索引:基于key进行顺序排序
  • 散列索引:将key散列到不同的hash桶中

索引技术非常多,适用于不同的场景,主要由以下几点衡量是否适用:

  • 访问类型:能支持的访问类型(包括查询具有特定属性值的记录、查询特定属性值在某个特定区间范围的记录)
  • 访问时间:找到一个特定记录或记录集所花费的时间
  • 插入时间:插入一个新记录所需要的时间
  • 删除时间:删除一个记录所需要的时间
  • 空间复杂度:维护索引结构所需要的空间开销

通常我们会在一个文件中建立多个索引,比如我们可能希望按照作者、主题或者书名来查找图书馆里的一本书。其中,用于查找的关键字称为搜索码,搜索码可以由一个或多个属性组成。

14.2 Ordered Indices

14.2.1 Dense and Sparse Indices

14.2.2 Multilevel Indices

14.2.3 Index Update

14.2.4 Secondary Indices

14.2.5 Indices on Multiple Keys

14.3 B±Tree Index Files

14.3.1 Structure of a B±Tree

14.3.2 Queries on B±Trees

14.3.3 Updates on B±Trees

14.3.4 Complexity of B±Tree Updates

14.4 B±Tree Extensions

14.4.1 B±Tree File Organization

14.4.2 Secondary Indices and Record Relocation

14.4.3 Indexing Strings

14.4.4 Bulk Loading of B±Tree Indices

14.4.5 B-Tree Index Files

14.4.6 Indexing on Flash Storage

14.4.7 Indexing in Main Memory

14.5 Hash Indices

相关推荐
数澜悠客10 分钟前
AI规则引擎:解锁SQL数据分析新姿势
数据库·人工智能·oracle
懵逼的小黑子30 分钟前
飞书配置表数据同步到数据库中
数据库·飞书
Elastic 中国社区官方博客35 分钟前
在 Elasticsearch 中删除文档中的某个字段
大数据·数据库·elasticsearch·搜索引擎
杨凯凡41 分钟前
MySQL入门指南:环境搭建与服务管理全流程
数据库·mysql
时序数据说1 小时前
时序数据库IoTDB分布式系统监控基础概述
大数据·数据库·database·时序数据库·iotdb
虾球xz1 小时前
游戏引擎学习第278天:将实体存储移入世界区块
数据库·c++·学习·游戏引擎
forestsea2 小时前
MySQL 入门大全:数据类型
数据库·mysql
为自己_带盐2 小时前
浅聊一下数据库的索引优化
开发语言·数据库·php
gb42152873 小时前
mysql数据库中某个数据表的碎片率自己降低了,mysql数据表对碎片率有自动优化机制吗?
数据库·mysql
AI大模型顾潇3 小时前
[特殊字符] 本地大模型编程实战(29):用大语言模型LLM查询图数据库NEO4J(2)
前端·数据库·人工智能·语言模型·自然语言处理·prompt·neo4j