MySQL Forums
Forum List  »  General

Confused about integer disk space
Posted by: Patrick St.Onge
Date: February 24, 2010 01:16PM

I'm in the process of optimizing a database, and one of the things I'm trying to do is to reduce table size. I have a column that has the type of INT, and I changed it to SMALLINT expecting to reduce table size. What happened instead was an increase in table size from 1.33GB to 1.34GB (this table has 17M rows).

Integers always take the same amount of space, correct? In other words if you store the numbers 1 and 10,000 they will both take the same amount of space. Why didn't my table decrease in size?

Options: ReplyQuote

Written By
Confused about integer disk space
February 24, 2010 01:16PM

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.