MySQL Forums
Forum List  »  Backup

Re: Predicting mysqldump.exe output size
Posted by: Rick James
Date: January 07, 2012 11:06AM

An INT (4 bytes on disk) may dump as "0," (2 bytes) or "-1222333444," (12 bytes).
An ENUM (1 byte on disk) may dump as '"female",' (9 bytes, while taking 1 byte on disk).
A VARCHAR(100) may dump as '"",' (3 bytes, while taking 1 byte on disk), or '"\"\\\"",' (9 bytes, while taking 4 bytes on disk)
A TIMESTAMP (4 bytes) or DATETIME (8 bytes) dumps as '"2012-01-07 09:00:09",' (22 bytes).
Etc.

No, 8/3 is not constant.

Other factors:
* (dump is smaller) InnoDB has more overhead on disk (2x-3x is a common rule of thumb)
* (dump is smaller) "free" space clutters disk, not the dump (but you are counting this)
* (dump is smaller) Indexes are not dumped (and should not be included in your equation).
* (dump is bigger) The dump (probably) includes the CREATE TABLE -- this is a couple hundred bytes that came mostly from the .frm file (which is usually 8K on disk). For small tables, this is a large 'percentage overhead' in the dump.
* etc.

Options: ReplyQuote


Subject
Views
Written By
Posted
4955
January 06, 2012 11:25AM
Re: Predicting mysqldump.exe output size
2647
January 07, 2012 11:06AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.