当前位置:网站首页>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 .
边栏推荐
- Es2019 key summary
- OneNote software
- 基于SSM框架茶叶商城系统【项目源码+数据库脚本+报告】
- With the deep integration of cloud platform, the "Xueba" objectscale in the object storage industry is coming
- Modifier of JS regular expression
- Internship: interface case implementation
- IO stream, character read / write, copy
- JS import and export
- Memorize unfamiliar words at SSM stage and update them from time to time
- File system and directory operations
猜你喜欢

基于servlet+jsp+mysql实现的工资管理系统【源码+数据库】

Es2017 key summary

Basic knowledge of redis

Foreign SSL certificate

FortiGate firewall configuration log uploading regularly

输入输出及中断技术——微机第六章学习笔记

Learning about signals

The new paradigm of AI landing is "hidden" in the next major upgrade of software infrastructure

Intern method of string

What is an optocoupler circuit and what should be paid attention to in actual use?
随机推荐
Es2016 key summary
Cheap SSL certificate abroad
Myrpc version 0
Clients accessing the daytime service (TCP)
Blocking queue example
How to use div boxes to simulate line triangles
Slam mapping, automatic navigation and obstacle avoidance based on ROS (bingda robot)
Servlet lifecycle
Detailed explanation of data link layer
Detailed explanation of network layer
A solution to the problem of "couldn't open file /mnt/repodata/repomd.xml"
Differences between beanfactory and factorybean
小C的数组(array)
FortiGate creates multiple corresponding DDNS dynamic domain names for multiple ADSL interfaces
SSL universal domain name certificate
Sectigo certificate
Robot slam navigation core technology and practice Season 1: Chapter 0_ Slam development overview
Issue SSL certificate with IP address
BeanFactory创建流程
FortiGate firewall quick initialization administrator password