Navigate
Home
ArticleWiki
Forum
Journal
Search
Newsletter
Links
Tech News
expertsrt.com
Welcome Guest.
Username:

Password:

Remember me

Possible DB compression to reduce size
Welcome, Guest. Please login or register.
December 03, 2008, 11:50:19 PM
11306 Posts in 1249 Topics by 499 Members
Latest Member: haulaslemycle
Experts Round Table Network  |  Databases  |  MySQL  |  Possible DB compression to reduce size « previous next »
Pages: [1]
Author Topic: Possible DB compression to reduce size  (Read 324 times)
Esopo
Governing Council Member
*
Offline Offline

Posts: 74


WWW
« on: December 30, 2006, 04:53:12 AM »

Hi,

I’m running a DB that is sure to get out of hands at some point in the future. In it I’m storing some fields that would normally not be used much except for the occasional report that can take as long as it wants to generate.

I was thinking, is there a way to tell MySQL to zip those fields (text)? Even if it would take longer to handle them afterwards.

As an alternative I’m thinking zipping the content myself and storing it as binary, but I thought I should ask in case what I imagined is already a feature.

Thanks,

Esopo.
Logged
VGR
Mentor

Offline Offline

Posts: 682



WWW
« Reply #1 on: December 30, 2006, 12:01:01 PM »

yes, this is called a "packed MyISAM table"
Logged

techie overlord, answers all kind of questions on http://www.europeanexperts.org
VGR
Mentor

Offline Offline

Posts: 682



WWW
« Reply #2 on: December 30, 2006, 12:05:39 PM »

to be more precise, you've to use the myisampack utility

alternatively, you've the new storage engine called "archive" which renders roughly the same service and moreover prtects your data from manipulations.

some sample data :
Quote
The Archive table is almost 75% smaller in size then the MyISAM table and almost 83% smaller in size then the transactional InnoDB engine
Even with compression applied, the Archive table is still 7% smaller than the packed MyISAM table

see http://dev.mysql.com/tech-resources/articles/storage-engine.html
Logged

techie overlord, answers all kind of questions on http://www.europeanexperts.org
Esopo
Governing Council Member
*
Offline Offline

Posts: 74


WWW
« Reply #3 on: December 30, 2006, 08:14:45 PM »

Thanks for the reply.
I read the page and now I'm aware of the Archive, although it doesn't fit my requirements. I also found this:
http://dev.mysql.com/doc/refman/5.0/en/encryption-functions.html#function_compress

Although I also found some recent bug complaints about it. It did get me inspired, and I think I'm just going with PHP's gzcompress(), I ran some tests and it seems to be very fast, I would even consider it for normal daily use.

More on the other thread:
http://www.expertsrt.net/main/forum/topic,1067.msg9658#msg9658
Logged
Pages: [1]
« previous next »
    Jump to: