I'm trying to decide whether to normalize a thing further, and need to know what the smallest a row in InnoDB can be (I've got MySQL 5.6).
This is not exactly my case, but for simplicity, let's assume I just have a surrogate PK (bigint) and two TINYINT columns, neither of which can be null. How many bytes can I expect each row to need for storage if I'm gonna have 1 billion of these?
I'd imagine each row requires some metadata (I know it does at least for when there are NULLable columns), but can't seem to find the documentation on how to calculate it.
Then, how much can I expect to be eaten by the free space in the page, and the metadata in the page (or is that all together)?
I want to know so that I can better judge when I would have a long table that is narrow enough to avoid proper normalization.
Aucun commentaire:
Enregistrer un commentaire