0001000: 0a00 0000 040f 9000 0f90 0fc8 0fac 0fe4 ................
So there are 4 cells in this btree page. But that's not what I'm seeking.... I want to know the level of the BTree, don't know if "level" is the exact term to express my idea, let's see in this: A cell in the BTree is comprised of n keys and (n+1) pointers to its children, the layout is like this: (pointer0, key1, pointer1, key2, pointer2, ... , keyn, pointern) What I want to know is how to get the value of "n" ? And how to tune this value ? Because in my development, I found there are plenty of disk IO access during INSERT when one table grows larger. So I suspect the value of "n" should be much smaller. ________________________________ From: sqlite-users <sqlite-users-boun...@mailinglists.sqlite.org> on behalf of Clemens Ladisch <clem...@ladisch.de> Sent: Friday, August 11, 2017 14:41 To: sqlite-users@mailinglists.sqlite.org Subject: Re: [sqlite] What's the level of B+-Tree ? ni james wrote: > In the "SQLite File Format" document, the BTree layout is described, > but now I want to know how to get the BTree level (which is the 'K' > value mentioned in the Documentation)? At the end of section 1.5, a "K" is defined. But I don't think that is the same K. Anyway, the document also says: | The cell pointer array of a b-tree page immediately follows the b-tree | page header. Let K be the number of cells on the btree. The cell | pointer array consists of K 2-byte integer offsets to the cell | contents. The number of cells in the page is found at offset 3 in the b-tree page header. Regards, Clemens _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users sqlite-users Info Page<http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users> mailinglists.sqlite.org To see the collection of prior postings to the list, visit the sqlite-users Archives. (The current archive is only available to the list ... _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users