On 4 Sep 2019, at 11:18am, Peng Yu <pengyu...@gmail.com> wrote: > For now, I just delete the db file if it exists already. So that I don’t need > to call DROP TABLE IF EXISTS mytab. I guess directly deleting the db file can > be faster than the latter. Is it so?
The answer will change depending on your hardware and operating system. So I cannot tell you "this way will always be faster". You will have to experiment. If the table already exists and its structure will not change (same columns, same indexes) then the fastest thing to do is usually DELETE FROM MyTable; SQLite spots the fact that there is no WHERE clause and does something special. _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users