What is the best practice for storing a huge amount of text (in the database or as a file?), And how about compressing it?

I am creating a web application that processes internal emails and other frequent small and medium fragments of text between users and clients. What is the best way to store this data? In a database (MySQL) or in the form of thousands of separate files? How to compress it (PHP gzcompress () or MySQL compression functions)?

This will not be a public application, so the user load will be minimal (less than 20 users at a time). However, there will be many posts going back and forth every day in the application, so I expect that over time the amount of data will grow quite strongly (which is why I would like to compress it).

I would like to store the data in a database for ease of access and portability, but some of the streams I saw here regarding images suggested using file storage. What do you think?

Thanks Seth

Edit for clarification: I do not require any text search, so I would tend to compress it to save space.

+3
source share
4 answers

, (Excel, , PDF ..) . . , , , , . , . , .

-, CLOB BLOB, .

+1

, . , () .. , .

, -, , - - , HTTP-.

+1

. , . , , , , , . , , .

, , . , .

0

I wonder how big this "middle piece" is. If the text is just written messages (so less than 10 KB), then compression makes them even smaller and will not have a big impact on the growth of the database. This makes development and maintenance also much easier to have everything available with a single request and not get the contents of the file separately.

0
source

Source: https://habr.com/ru/post/1702595/


All Articles