Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it a good idea to use gzcompress

I have a forum which allows users to enter large amounts of text along with (sanitized) html (and/or markdown) and links, etc. Everything is sanitised and checked before it is stored in the database.

Would it be a good idea to use gzcompress. I've heard that it is not good if you intend to search this text. Should I compress the content before saving it to the database and use only the title and tags for searching, or does it not matter?

like image 533
john mossel Avatar asked Dec 07 '25 09:12

john mossel


1 Answers

I would store the content as text. Then, if space becomes a problem, you can explore an optimization like this later.

You may find this discussion worth reading: Planning for efficiency early vs Premature optimization

like image 168
Nick Clark Avatar answered Dec 10 '25 00:12

Nick Clark



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!