Normally (to my understanding), a BTree of some sort is declared on a set of columns of a table when an index (or something which requires an index) is declared on that set of columns.
However, I'd like to use a table as a "pure" BTree, i.e. one in which the order is not dependent on values in given columns, but on an implicit ordering of table elements, which is determined by inserting elements before or after other elements.
This cannot be done efficiently (at least not elegantly) with explicit indexes. For example, let's say I'm using integer indexes to define the order, and I have a table with one million records. If I insert a new record halfway through the table, then I have to update the integer column for 500,000 elements--hardly O(log(n)) performance :-)
Row IDs clearly won't do the trick, as they have no implicit ordering. However, I was wondering if the particular internal tree structure used by sqlite provides some sort of implicit btree structure which is accessible to insertions, deletions, and comparisons. The SQLite docs don't suggest any such possibility, but I thought it'd be worth asking.
Thanks, Ken