2 ms·
I have all SQL exported to CSV and committed to git once a day (no, I don't think this is the same as WAL/replication). Dumping to CSV is built into MySQL and
by sam_goody 3y ago
I have all SQL exported to CSV and committed to git once a day (no, I don't think this is the same as WAL/replication).
Dumping to CSV is built into MySQL and Postgres (though MySQL has better support), is faster on export and much faster on import, doesn't fill up the file with all sorts of unneeded text, can be diffed (and triangulated by git) line by line, is human readable (eg. grepping the CSV file) and overall makes for a better solution than mysqldumping INSERTs.
In Docker, I can import millions of rows in ~3 minutes using CSV; far better than anything else I tried when I need to mock the whole DB.
I realize that the OP is more talking about using CSV as a interchange format or compressed storage, but still would love to hear from others if my love of CSV is misplaced :)