Yahoo! Mail wrote: > sqlite> drop table if exists t1; create table t1(a datetime); begin; with > recursive c(x) as (values(1) union all select x + 1 from c where x < > 1000000000) insert into t1(a) select datetime('now') from c; commit; > > It would take ages to finish and that is logical; it's a billion rows > it has to insert, even though I have used begin - commit. > > Now the rather strange behavior would be when I use the up arrow key > to reuse the previous code but replacing *1000000000* with *10*. It > takes the same time to finish as before and that is not right; I'm > dropping the table and it should take nearly 0 milliseconds for > 10 rows.
The DROP TABLE is slow, but it should not be the same time: sqlite> .timer on sqlite> create ...; begin; with ... 20000000) insert ...; commit; Run Time: real 34.315 user 34.242219 sys 0.046800 sqlite> drop table if exists t1; Run Time: real 0.578 user 0.577204 sys 0.000000 sqlite> create ...; begin; with ... 10) insert ...; commit; Run Time: real 0.000 user 0.000000 sys 0.000000 Regards, Clemens