-
Notifications
You must be signed in to change notification settings - Fork 48
/
page_layout.txt
75 lines (57 loc) · 1.4 KB
/
page_layout.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
header:
1Kb total
|
-- header size -- 4 bytes
-- page size -- 4 bytes
-- entry size -- 4 bytes
-- key size -- 4 bytes
-- number of pages -- 8 bytes
-- max page index -- 8 bytes
-- root index -- 8 bytes
-- next lookup page pointer -- 8 bytes
-- pool of available index spots -- page size - 40 (7 variables);;
|
internal page:
1Kb total
|
-- node type -- 2 bytes
-- current capacity -- 4 bytes
-- ADD ONS SIZE: (2+4) = 6 bytes
-- keys -- 8 bytes * max size
-- pointers -- 8 bytes * max size
|
leaf page:
1Kb total
|
-- node type -- 2 bytes
//!!-- has overflow -- 2 bytes
-- next pointer -- 8 bytes
-- prev pointer -- 8 bytes
-- current capacity -- 4 bytes
-- ADD ONS SIZE: (2+8+8+4) = 22 bytes
-- keys -- 8 bytes * max size
-- overflow pointers -- 8 bytes * max size
-- satellite data -- variable * max size
|
overflow page:
1Kb total
|
-- node type -- 2 bytes
-- next pointer -- 8 bytes
-- prev pointer -- 8 bytes
-- current capacity -- 4 bytes
-- ADD ONS SIZE: (2+8+8+4) = 22 bytes
// no need for keys, since we already know
// the key to that overflow page
satellite data -- variable * max size
|
lookup page overflow page:
1Kb total
|
-- node type -- 2 bytes
-- next pointer -- 8 bytes
-- current capacity -- 4 bytes
-- ADD ONS SIZE: (2+8+4) = 14 bytes
-- number of keys dependenet on page size
exact number is floor(pagesize/keysize)
|