Christian Calloway wrote:

I had a small question concerning how MySQL stores text and longtext fields.
Long story short, I have to store a large amount of "textual" data, and was
wondering if I should compress said data and then store it in the db, or
does MySQL already concern itself with compression (which would make it
pointless to pre-compress). Thank you



As far as I know MySQL doesn't do any compression on any fields. If this is a static unchanging set of data mysql does allow you to compress entire tables with the myisampack command but the table become read-only. As of MySQL version 4.1.1 you can use the functions COMPRESS() and UNCOMPRESS() in an sql query if the server was compiled with zlib (it will return null if it wasn't). Other than that you would have to compress the data yourself using php functions before inserting it. You would want to store data in a BLOB/LONGBLOB column either way though since it is now binary data.


--Dan--

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to