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?
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With