Contents
Why might we prefer to use a SQL database instead of a CSV file to store data?
You can create meaningful reports from data in a database. Your data has a built-in structure to it. Information of a given type is always stored only once. Databases are concurrent; multiple users can use them at the same time without corrupting the data.
When should I use CSV instead of SQL?
CSV is only useful for write once, readd once type apps. If you want to import swiftly like a thief in the night, use SQL format. If you are working in production server, CSV is slow but it is the safest. Just make sure the CSV file doesn’t have a Primary Key which will override your existing data.
Why do we use CSV files?
A CSV (comma-separated values) file is a simple text file in which information is separated by commas. CSV files are most commonly encountered in spreadsheets and databases. You can use a CSV file to move data between programs that aren’t ordinarily able to exchange data.
Is CSV faster than SQL?
SQL is NOT ALWAYS faster than a CSV file. It depends a lot on the data you’re working with and what queries you perform.
Is it okay to use CSV as a database?
Yes, but if you are planning to use ODBC connectivity, then realize that ODBC is READONLY for CSV files. So if you want to make changes to the data within the fields/records (columns/rows), then you will need to make the changes in memory, then write the updated records back out to a new file.
How does the performance of CSV and Excel data sources compare?
My posts from two weeks ago (see here and here) on using Process Monitor to troubleshoot the performance of Power Query queries made me wonder about another question: how does the performance of reading data from CSV files compare to the performance of reading data from Excel files?
How big is a CSV file for a query?
To start off, I took the 153.6MB CSV file used in my last few posts and built a simple query that applied a filter on one text column, then removed all but three columns.
How long does it take to run a CSV query?
The resulting query ran in 59 seconds – around 6 times slower! Here’s a comparison with the performance of this query with the first query: