简体   繁体   中英

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?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM