SQLite Forum

find in b+-tree node
Login
My test environment is:
#create table test (name text,age int);
#create index idx on test(name);
#table test include a record (name:'tom',age:32).
My confusion is when I apply the following statement,how sqlite match the record and the b+-tree node which include the record ?
statement:select * from test where name='tom';

First,I say my understanding, but I'm not sure if it's correct, so I hope you can confirm it for me. If there are any mistakes, please correct them。
##My understanding is :vm engine use tree-module service,tell tree-module vm want to get record which name='tom'.tree-module first do binary-search in a b-tree (which holds the content of the index of table test) to find rowid,then do a binary-search in b+tree (which holds the records of the table test) by rowid.
 
when get rowid,how to map the rowid to tree-node which include the rowid?