On 3/19/16, Simon Slavin <slavins at bigfraud.org> wrote: > > I create the following index on the table: > CREATE INDEX t_b ON t (b); > There are two ways to make the index. > > (A) Go through the table in row order adding each row to the index, > modifying the tree as you go. > > (B) Use the same strategy as you would for the command > SELECT * FROM t ORDER BY B > using any existing index or creating a temporary one as required. > > Which does SQLite do ?
(B). It's much much faster that way. -- D. Richard Hipp drh at sqlite.org

