【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

相关推荐
小菜yh9 分钟前
关于Redis
java·数据库·spring boot·redis·spring·缓存
Microsoft Word29 分钟前
数据库系统原理(第一章 数据库概述)
数据库·oracle
华为云开源39 分钟前
openGemini 社区人才培养计划:助力成长,培养新一代云原生数据库人才
数据库·云原生·开源
kejijianwen4 小时前
JdbcTemplate常用方法一览AG网页参数绑定与数据寻址实操
服务器·数据库·oracle
编程零零七4 小时前
Python数据分析工具(三):pymssql的用法
开发语言·前端·数据库·python·oracle·数据分析·pymssql
高兴就好(石7 小时前
DB-GPT部署和试用
数据库·gpt
这孩子叫逆7 小时前
6. 什么是MySQL的事务?如何在Java中使用Connection接口管理事务?
数据库·mysql
Karoku0667 小时前
【网站架构部署与优化】web服务与http协议
linux·运维·服务器·数据库·http·架构
码农郁郁久居人下8 小时前
Redis的配置与优化
数据库·redis·缓存
MuseLss9 小时前
Mycat搭建分库分表
数据库·mycat