I am using the sqlite3 command .dump like so:
sqlite3 infile.db ".dump my_table" | sqlite3 outfile.db
At first I thought I had finally found a way to copy (among others) indexes, which would be great for parallel processing reasons.
But now it seems to me that the indexes are merely recreated as the sqlite3 infile.db process is long finished while the sqlite3 outfile.db process is still running at 100% CPU.
Short answer: The command .dump recreates the indexes on the copied tables. It does not copy the indexes.
Indexes are copied using the .backup command, but this does not support addressing single tables.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With