MySQL Forums
Forum List  »  MyISAM

Re: Calculate bytes stored per row for dynamic format
Posted by: Rick James
Date: July 05, 2012 06:00AM

I've seen a script; it is sometimes pasted into one of these forums. But it only handles INSERT-only MyISAM data, not DELETEs, not InnoDB, not INDEXes.

A simpler rule of thumb would be 100-1000 bytes per row per table. We got "up to 463" before accounting for updates and indexes. 100-1000 covers most variations except for big (BLOB, TEXT, etc) fields.

Is there some reason for using MyISAM? InnoDB is the preferred Engine.

DELETEs and UPDATEs complicate things because...
* UPDATE will (sort of, sometimes) delete the old row and add new row.
* DELETE leaves a gap in the table; this gap will be reused by future INSERT(s).
* The disk space for a table will not shrink. (See also OPTIMIZE, ALTER.)

Edited 1 time(s). Last edit at 07/05/2012 06:02AM by Rick James.

Options: ReplyQuote

Written By
Re: Calculate bytes stored per row for dynamic format
July 05, 2012 06:00AM

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.