search

Home  >  Q&A  >  body text

mysql - Database storage structure and index issues

Assuming that a node can hold 100 values, then a 3-layer B-tree can hold 1 million data. How do you get 1 million?
Is B-tree also used because it has fewer layers than B-tree? The index is a B-tree structure and is stored in a file. When querying, do you query the reference address of the data?

给我你的怀抱给我你的怀抱2713 days ago936

reply all(1)I'll reply

  • 世界只因有你

    世界只因有你2017-06-22 11:56:32

    According to this theory, there are a total of 100 leaf nodes (100+1)(100+1)≈ 1000000 First layer 100 Second layer 100+1 100 Third layer 100+1 100 * (100+1) . B+ tree non-leaf nodes will not carry ROWID. One block can accommodate more index items. First, it can reduce the height of the tree (that is, the number of layers). Second, one internal node can locate more leaf nodes. The index is a logical combination of this structure. The nodes of the B-tree are connected by pointers (pointing to physical addresses)

    reply
    0
  • Cancelreply