View Single Post

   
  #1 (permalink)  
Old 02-28-2008, 09:48 AM
ivanatora@gmail.com
 
Posts: n/a
Default Optimizing by replacing INTEGER with SET

Hello all!
We have a little performance issue with a MySQL DB with about 120 000
records (rows). Average row size is 800 bytes and thus all DB is about
100MB big. We are wondering of ways to decrease that size.
We have some columns that currently are INTEGER and take values
between 1 and 12 (or 1-5 or 1-20). I wonder if I change this INTEGER
to SET (every number for one list item) will the average row size
decrease?
The other way I though is to use TINYINT(2) (2 is the lenght - 2
signs, right?) - will it save space in that case?
I'm not sure of how many bytes each data type takes. Does that depend
on the filesystem cluster size or some varing value like that? Becouse
I didn't find anything exact info about that.

The main question for now is will the datatype change decrease size of
the DB?

Thank you.

Reply With Quote