Archive for December 5th, 2008

She Is Such a Delicate Creature

authored on Friday, December 5th 2008

In conjunction with the previous post I was clearing up my database, one of them, the table was 68 MB strong! No matter how I download, I could never make a full backup of it.

However this afternoon I managed to shrink that I didn’t database from 68 MB to only 2.6 MB :-)

you should first understand that in creation of that database, I was very lazy to set the field type appropriately to what I need instead I made most of the fields “text” (which can hold up to 2 million characters) which would bloat up this lady.

The moment I know what I want, and change those text view to “varchar” of only 255 characters, she shrank by 300%! doing the math here that would be 20 MB.

Next , I deleted old archives and that shave off another 10 MB.

Lastly, instead of storing the content I need on the SQL database, I made it to read dynamically. In that sense, I dropped a field from the database.

2.6MB. TADA!

Oh yeah, if I zip the contents, I got it compressed as low as 600 kB

A full day’s work. Now I am a happy man, and she is a gorgeous creature ;)