Obviously you did not get my issue; something is wrong and your timer suggestion indicates this. During the execution of each command, I would monitor it with *watch "du test.db*"*. The journal size would go mad even surpassing the database's actual size at some moments.
*sqlite> .timer on sqlite> drop table if exists t1; create table t1(a datetime); vacuum t1; begin; with recursive c(x) as (values(1) union all select x + 1 from c where x < 100) insert into t1(a) select datetime('now') from c; commit; Run Time: real 0.207 user 0.000000 sys 0.004000 sqlite> drop table if exists t1; create table t1(a datetime); vacuum t1; begin; with recursive c(x) as (values(1) union all select x + 1 from c where x < 100000000) insert into t1(a) select datetime('now') from c; commit; Run Time: real 94.226 user 73.096000 sys 4.788000 sqlite> drop table if exists t1; create table t1(a datetime); vacuum t1; begin; with recursive c(x) as (values(1) union all select x + 1 from c where x < 100) insert into t1(a) select datetime('now') from c; commit; Run Time: real 209.612 user 4.724000 sys 21.588000* On 08/28/2015 01:48 PM, Clemens Ladisch wrote: > 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 > _______________________________________________ > sqlite-users mailing list > sqlite-users at mailinglists.sqlite.org > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users