or
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up
Syntax | Example | Reference | |
---|---|---|---|
# Header | Header | 基本排版 | |
- Unordered List |
|
||
1. Ordered List |
|
||
- [ ] Todo List |
|
||
> Blockquote | Blockquote |
||
**Bold font** | Bold font | ||
*Italics font* | Italics font | ||
~~Strikethrough~~ | |||
19^th^ | 19th | ||
H~2~O | H2O | ||
++Inserted text++ | Inserted text | ||
==Marked text== | Marked text | ||
[link text](https:// "title") | Link | ||
 | Image | ||
`Code` | Code |
在筆記中貼入程式碼 | |
```javascript var i = 0; ``` |
|
||
:smile: | ![]() |
Emoji list | |
{%youtube youtube_id %} | Externals | ||
$L^aT_eX$ | LaTeX | ||
:::info This is a alert area. ::: |
This is a alert area. |
On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?
Please give us some advice and help us improve HackMD.
Do you want to remove this version name and description?
Syncing
xxxxxxxxxx
2022-11-29 課堂問答簡記
System Design Course
Content Delivery Network (CDN)
the benefits of CDN, including:
B+ Trees Implement in SQL
以下圖例以 5-way 為例(一棵樹的每個節點的度數小於等於 5)
B+ Trees 將所有資料(Data)存在 leaf node 上,leaf node 之外的 node 只會儲存 key 供索引,且每個 leaf node 會直接接到下一個 leaf node,可以利用類似 Binary Search Tree 的方式去搜尋目標值。
因為 B+ 將 leaf node 串接了,所以可以僅一次的搜尋就做到範圍查詢,以上圖為例,要搜尋 key 介於 5~16 之間的 Data,僅需搜尋下限 key = 5,並利用 leaf node 之間的 pointer 就可以將 5、6、7、9、12、16 這些目標找出。
對於硬碟來說,每個區塊大小固定,且 B+ Tree 的非葉節點只須儲存指針(Key),當 Data 所需空間很大時並不影響非葉節點,所以可增加(相較於 B Tree)每個 node 的指針數量,以減少 I/O 次數,因此被應用在 MySQL 的 InnoDB 中。
模擬面試
校友經驗分享問答: champ
分享
QA