MySQL Forums :: General :: Confused about integer disk space


Advanced Search

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


Subject Written By Posted
Confused about integer disk space Patrick St.Onge 02/24/2010 01:16PM
Re: Confused about integer disk space Rick James 02/25/2010 04:10PM
Re: Confused about integer disk space Patrick St.Onge 02/26/2010 01:05PM
Re: Confused about integer disk space Rick James 02/26/2010 02:06PM
Re: Confused about integer disk space Patrick St.Onge 02/26/2010 03:09PM
Re: Confused about integer disk space Rick James 02/26/2010 07:21PM


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.