Is there an advantage to storing a compressed file in a database

Background information on the problem.

  • PostgreSQL 9.1 Database
  • Data is a large amount of text (web page markup language).
  • Column bytea

Therefore, I can save text compression using PHP gzcompress and possibly reduce the file size to 70%, and then save it in the bytea column. But is it really worth it? Is bytea compressed in PostgrSQL with TOAST, and adding another compression level will not have a significant effect on data size?

+5
source share
1 answer

Yes and no, it depends on your application.

RE: TOAST, PostgreSQL ( LZ), , 2KiB.

, HTML, , , 2KiB, , , , , HTML 10KiB, . , PHP.

, -, , , 2KiB, ( , ), .

, ( > 10 ) , , , !, PostgreSQL .

+3

All Articles