Reputation: 3648
Let's say I'm importing multiple csv files into mysql. How can I find out how much space I need for this database (and as far as i noticed it doesn't seem to be the same size like csv files size)?
Upvotes: 1
Views: 4531
Reputation: 150118
If you want to get more exact see this MySQL Manual reference.
Note that if you are using characters sets such as UTF-8 (for Unicode) you may be averaging more than one byte per character in your strings.
Upvotes: 1
Reputation: 30751
Just import eg. 100 rows from the CSV. you will get a size for this db including the needed space for indexes. now you can calc up to your estimated rows from the csv. But dont take this numbers to the point, its just an approximation.
Upvotes: 1
Reputation: 625147
Back of the envelope estimation combined with basic knowledge of data type storage requirements.
For example, CSV file contains:
And there you have an estimate.
Upvotes: 7