I was about to import a .sql file into a database. The size of the sql file is 35GB, and the available size in our server is 10gb. At this point, can I import the sql file into the database? I'm not sure whether it can be done.

My question here is how much space is required to import a 32GB sql file into the database?

| improve this question | | | | |
  • We can't answer this question. You could have 35GB of a .sql file that is a bunch of inserts of a tinyint into tables and columns with extremely long names. Impossible for us to guess how big the eventual data will be based on the textual size of the insert statements... – Aaron Bertrand Jan 9 '15 at 18:13

Database size in InnoDB tablespace totally depends on the data. It can be larger than the SQL dump or smaller.

On one hand InnoDB has some overhead that tends to make the tablespace larger.

On other hand some fields values in the SQL dump use more space than in the tablespace. For example, integer value 1234567890123 uses 13 bytes as a string, but just 4 bytes and a value of INT type.

| improve this answer | | | | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.