mercredi 8 juillet 2015

save table in csv file in sqlite3

I am trying two merge two tables and save them as cvs file. For that I did the following:

sqlite> .headers on
sqlite> .mode csv
sqlite> .output trail1.csv
sqlite> SELECT * FROM trainSearchStream, SearchInfo WHERE  trainSearchStream.SearchID = SearchInfo.SearchID;

Surprisingly, I end up with a huge file (47.41GB) although my initial database is 40.24GB and it includes several tables. I expected to have a ~10GB file. Is there a more efficient way to save my table as cvs file.

Aucun commentaire:

Enregistrer un commentaire