当前位置:网站首页>One interview question a day the difference between B tree and b+ tree
One interview question a day the difference between B tree and b+ tree
2022-06-30 04:34:00 【Garfield cat】
Basics
B Tree is also called balanced multi-path search tree , As the name suggests, this kind of data structure is generally used to search faster ,B+ Trees are B A strengthening tree of trees .
difference
B Each node of the tree stores key and data.
B Trees because of key and data The same node exists , Unable to perform interval query .
B The best time complexity of tree query is O(1).
B+ The query time complexity of the tree is fixed as logN.
B+ Trees store data only in leaf nodes .
B+ The tree can be used for interval query , And because the non leaf node has no storage data, So each page loads more information into memory .
Extension
From the above differences, we can see why the data structure of the index in the database uses B+ Trees , The first point is that its non leaf nodes do not store data ; The second point is that you can perform interval queries ; Third, the query time complexity is fixed .
边栏推荐
- FortiGate configures multiple server IPS as link monitor monitoring objects on the same interface
- [learn FPGA programming from scratch -52]: high level chapter - FPGA development based on IP core - basic framework for IP core use (taking PLL as an example)
- What is an optocoupler circuit and what should be paid attention to in actual use?
- Cheap SSL certificate abroad
- 基于servlet+jsp+mysql实现的工资管理系统【源码+数据库】
- OneNote production schedule
- Indefinite parameters of JS function
- Redis implements SMS login function (II) redis implements login function
- Encapsulating JDBC tool classes
- 7-3 打怪升级 单源最短路
猜你喜欢

基于SSM框架茶叶商城系统【项目源码+数据库脚本+报告】

Input / output and interrupt technology -- microcomputer Chapter 6 learning notes

BeanFactory创建流程

el-upload上傳文件(手動上傳,自動上傳,上傳進度)
![Tea mall system based on SSM framework [project source code + database script + report]](/img/d9/0a46c0da9839a7186bd3a9ae55f0a5.png)
Tea mall system based on SSM framework [project source code + database script + report]

Introduction to system programming

Break through the existing customer group marketing, and try customer grouping management (including clustering model and other practical effect evaluation)

Robot slam navigation core technology and practice Season 1: Chapter 0_ Slam development overview

Day 11 script and game AI

Redis implements SMS login function (II) redis implements login function
随机推荐
QT 6.3.1conan software package release
IO stream, character read / write, copy
A solution to the problem of "couldn't open file /mnt/repodata/repomd.xml"
Detailed explanation of data link layer
Default value of JS parameter
深度融合云平台,对象存储界的“学霸”ObjectScale来了
IIS request SSL certificate
Myrpc version 2
Difference between request forwarding and redirection
SQL append field
Use of thread pool
FortiGate firewall configuration link detection link monitor and status query
Threadlocal
[FPGA] IIC读写EEPROM 的实现
Day 11 script and game AI
Blocking queue example
FortiGate configures multiple server IPS as link monitor monitoring objects on the same interface
Named pipes for interprocess communication
Indefinite parameters of JS function
Share an example of a simple MapReduce method using a virtual machine