[sqlite] Recipe to safely move/rename a database?

2009-12-07 Thread Chris Eich
I have a scenario where I want to move 99+% of the records from one database to another, initially empty but for a set of table definitions (in practice, copied from a template file). On my Linux platform, I find that the INSERT INTO archive.my_table SELECT * FROM my_table WHERE (...) takes

Re: [sqlite] Recipe to safely move/rename a database?

2009-12-07 Thread Simon Slavin
On 7 Dec 2009, at 9:58pm, Chris Eich wrote: On my Linux platform, I find that the INSERT INTO archive.my_table SELECT * FROM my_table WHERE (...) takes unreasonably long (it involves about 30MB of data). Do you have a transaction around all the INSERT commands ? This will speed it up many

Re: [sqlite] Recipe to safely move/rename a database?

2009-12-07 Thread raf
Simon Slavin wrote: On 7 Dec 2009, at 9:58pm, Chris Eich wrote: On my Linux platform, I find that the INSERT INTO archive.my_table SELECT * FROM my_table WHERE (...) takes unreasonably long (it involves about 30MB of data). Do you have a transaction around all the INSERT commands ?