What is the most accurate way to gauge how large a database is with the following characteristics:
- MySQL
- 1 table with three columns:
- id → big int)
- field1 → varchar 32
- field2 → char 32
- there is an index in the field2
You can assume that varchar 32 is completely full (all 32 characters). How big would it be if each field is completed, and is:
- 1 million rows
- 5 million rows
- 1 billion rows
- 5 billion rows
My rough estimate allows: 1 byte for id, 32 bits for the other two fields. About:
1 + 32 + 32 = 65 * 1 000 000 = 65 million bytes for 1 million rows = 62 Megabyte
Thus:
- 62 Mb
- 310 Mb
- 310 000 Mb = + - 302Gb
- 1,550,000 MB = 1,513 GB
Is this an accurate estimate?
source share