SQLite Forum

payload and overflow page

payload and overflow page

(1) By sqlite3_preupdate_count (XiongZaiBingGan) on 2021-01-16 08:17:41 [link] [source]

<inside sqlite> says: Once an overflow page is allocated, as many bytes as possible are moved into the overflow pages without letting the cell size drop below the min embedded payload fraction value (in the database file header at offset 22).

what are the benefits of this? why move as many as possible ?

(2) By Richard Hipp (drh) on 2021-01-16 12:51:24 in reply to 1 [link] [source]

The benefit is that there is more space left over on the original page to hold other cells. For interior pages (where this happens) you want as many cells per page as you can get, because that increases your fanout, which means you have fewer pages to load in order to locate a record within the tree.

(3) By sqlite3_preupdate_count (XiongZaiBingGan) on 2021-01-18 12:35:11 in reply to 2 [source]

thanks for your answer,more cells in a node,the b+/b-tree's depth is smaller.