Re: Calculate bytes stored per row for dynamic format
Overhead per row: 1-2 bytes (2 if utf8, not because of charset, but because it could be longer than 255 bytes.)
BIGINT: 8 bytes
VARCHAR(150), if Ascii or latin1: 1-151 bytes
VARCHAR(150), if utf8: 2-452 bytes
NULL (if any columns are NULLable): 1 byte
100K rows -- at least 1MB (tiny); worst case: 46.3MB (medium sized). Even at 46MB, 1/3 of the tables discussed here are bigger than that.
INDEX size -- that's another formula; do you need that, too?
If you DELETE or UPDATE rows, the math gets more complex.
Why have a BIGINT? INT (4 bytes) is big enough for most uses.
INT UNSIGNED can hold values 0..4 billion.
Subject
Views
Written By
Posted
3071
July 03, 2012 12:29PM
Re: Calculate bytes stored per row for dynamic format
1733
July 04, 2012 09:28AM
2079
July 04, 2012 09:44AM
1758
July 05, 2012 06:00AM
1586
July 13, 2012 05:11AM
1484
July 17, 2012 07:44PM
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.