avatar
文章
156
标签
74
分类
16
Home
Archives
Link
About
LogoLiarlee's NotebookB+树笔记 返回首页
搜索
Home
Archives
Link
About

B+树笔记

发表于2024-09-20|更新于2025-12-09|Database
|浏览量:

Start

下面的两个非常通俗的解释了 B tree 的定义, 以及btree 是如何完成数据插入以及查找的, 不同的程序会使用不同结构的 btree 变体, 是在通常的Btree 逻辑框架上面添加更多的限制条件和规定。

Understanding B-Trees: The Data Structure Behind Modern Databases

https://www.youtube.com/watch?v=K1a2Bk8NrYQ&t=42s

B-trees and database indexes

https://planetscale.com/blog/btrees-and-database-indexes#how-mysql-uses-b-trees

文章作者: Liarlee
文章链接: https://liarlee.site/2024/09/20/Database/Databases_MySQL_B+Tree/
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 Liarlee's Notebook!
Database
cover of previous post
上一篇
TrueNAS Core 自动更新UI证书
这两天提示 TrueNAS Core UI 的证书过期了, 看了一下, 默认是一年的证书, 需要更新了。 使用 certbot 自动更新证书的方式比较干净,原始文档在这里 . 比其他的方法要好, 其中记录的步骤不太细致或者已经过时了, 记录一下我的步骤。 Go 创建一个Jail, 名称是 certbot, 具体的Release选择哪个都可以。本身这个证书只是给UI使用, 所以也就不需要创建任何的 Dataset 挂载进去。 在 TrueNAS Core 创建一个新的 API Key, 用来给脚本部署证书使用。 在 Cloudflare 创建一个新的 API Key 用来作为 dns challenges 的入口, 调用 cloudflare 的接口。 通过 UI 登录到 Jail 里面执行初始化。 1234567891011121314151617181920212223242526272829303132333435363738394041424344# Install prerequisitespkg updatepkg install python311 py311-...
cover of next post
下一篇
Kubernetes NFS CSI 启动 bitnami postgres 镜像权限不足
开始准备在kubernetes 集群里面部署一个 pgsql, 存储一些自己的个人数据,postgres pod 启动不了,pod 会反复 CrashLoopback, 查看其中postgres 进程的容器, 会遇到这样的报错: 1234567891011fixing permissions on existing directory /var/lib/postgresql/data … okcreating subdirectories … okselecting dynamic shared memory implementation … posixselecting default max_connections … 20selecting default shared_buffers … 400kBselecting default time zone … Etc/UTCcreating configuration files … okrunning bootstrap script … 2020-07-28 19:47:30.936 UTC [73] FATAL: d...
相关推荐
cover
2333-12-08
CheatSheet_Databases
统计 MySQL 数据库占用的空间12345678910111213mysql Ver 8.4.1 for Linux on x86_64 (MySQL Community Server - GPL)mysql> select TABLE_SCHEMA, concat(truncate(sum(data_length)/1024/1024,2),' MB') as data_size, concat(truncate(sum(index_length)/1024/1024,2),'MB') as index_size from information_schema.tables group by TABLE_SCHEMA ORDER BY data_size desc;+--------------------+-----------+------------+| TABLE_SCHEMA | data_size | index_size |+--------------------+-----------+------...
cover
2024-09-08
Kubernetes NFS CSI 启动 bitnami postgres 镜像权限不足
开始准备在kubernetes 集群里面部署一个 pgsql, 存储一些自己的个人数据,postgres pod 启动不了,pod 会反复 CrashLoopback, 查看其中postgres 进程的容器, 会遇到这样的报错: 1234567891011fixing permissions on existing directory /var/lib/postgresql/data … okcreating subdirectories … okselecting dynamic shared memory implementation … posixselecting default max_connections … 20selecting default shared_buffers … 400kBselecting default time zone … Etc/UTCcreating configuration files … okrunning bootstrap script … 2020-07-28 19:47:30.936 UTC [73] FATAL: d...
cover
2023-05-19
数据库单表的测试
基于这个问题的测试为什么MySQL单表不要超过2000w行? 测试过程:123456789101112131415161718192021CREATE TABLE test(id int NOT NULL AUTO_INCREMENT PRIMARY KEY comment '主键',person_id int not null comment '用户id',person_name VARCHAR(200) comment '用户名称',gmt_create datetime comment '创建时间',gmt_modified datetime comment '修改时间') comment '人员信息表';插入数据:insert into test values(1,1,'user_1', NOW(), now());insert into test (person_id, person_name, gmt_create, gmt_mo...
cover
2024-07-31
MySQL 计算内存用量
对于 MySQL,可以按以下示例计算 RDS for MySQL 数据库实例的大致内存使用量:Maximum MySQL Memory Usage = innodb_buffer_pool_size + key_buffer_size + ((read_buffer_size + read_rnd_buffer_size + sort_buffer_size + join_buffer_size) * max_connections) From repost: https://repost.aws/zh-Hans/knowledge-center/low-freeable-memory-rds-mysql-mariadb From MySQL Offical:5.7 https://dev.mysql.com/doc/refman/5.7/en/memory-use.html8.0 https://dev.mysql.com/doc/refman/8.0/en/memory-use.html 存储引擎的说明:https://dev.mysql.com/doc/ref...
cover
2023-12-22
Redis 笔记
ElastiCache主要概念 ElastiCache nodesA node is the smallest building block of an ElastiCache deployment.node is a fixed-size chunk of secure, network-attached RAM.总结来说, 就是ec2实例上面跑了相同版本的Engine for Redis。 ElastiCache for Redis shards A Redis shard (called a node group in the API and CLI) is a grouping of one to six related nodes. A Redis (cluster mode disabled) cluster always has one shard.Redis (cluster mode enabled) clusters can have up to 500 shards, with your data partitioned across the shard...
cover
2023-05-09
RDS QPS 下降引发的网络流控分析记录
找到了另一个大佬对于TCP在linux内核的分析和测试: Link Topic 1 现象看到一个朋友的问题, 由 RDS QPS 下降引发的网络问题分析: 引用原文的问题描述: 这个问题一开始是在进行RDS实验的时候发现的。最初的情景是,多台机器同时对数据库进行select和insert操作时,会发现insert操作会造成select操作qps大幅下降,且insert操作结束之后select操作的qps仍不能回升。起初以为是RDS的问题,但是在复现问题、监控RDS之后发现RDS的压力其实很小。于是开始怀疑是网络的问题,在简化了场景和操作之后,发现能在过去做tcp实验的机器上复现,于是用这个更简单的场景进行问题复现和分析。 正确答案以及复盘: https://yishenggong.com/2023/05/06/why-does-my-network-speed-drop-cn/ 感谢大佬@plantegg 提供的这个案例和知识星球, tcp协议和 os 网络系统的分析我之前真是一句都说不出来, 这次确实完整的走了一遍网络的部分。 下面是我的一些思路和资料整理: 看完了问...
avatar
Liarlee
Archlinux User, Support Engineer
文章
156
标签
74
分类
16
Follow Me
公告
都道无人愁似我,今夜雪,有梅花,似我愁。
目录
  1. 1. Start
    1. 1.1. Understanding B-Trees: The Data Structure Behind Modern Databases
    2. 1.2. B-trees and database indexes
最新文章
CheatSheet_Linux
CheatSheet_Linux2333-12-08
CheatSheet_Kubernetes
CheatSheet_Kubernetes2333-12-08
CheatSheet_Databases
CheatSheet_Databases2333-12-08
© 2020 - 2025 By Liarlee框架 Hexo|主题 Butterfly
搜索
数据加载中