phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicolas Paris <nipari...@gmail.com>
Subject Binary fields and compression
Date Sun, 13 May 2018 10:50:07 GMT
Hi,

My use case is storing pdf files from one side, and it's content as text
from the other. Two kind of queries would either get the text, or the pdf
from the primary key. Rarely both.

Then I guess the option is to create two columns family, one containing a
VARBINARY column to store the binary pdf, and the other column family
containing the text and other metadata in other columns.

Since text can be compressed, I guess that's would be a good idea to
compress the table.

CREATE TABLE DOCUMENTS (HOST VARCHAR NOT NULL PRIMARY KEY, A.CONTENT
VARBINARY, B.TEXT VARCHAR, B.LABEL VARCHAR, B.DATE_CREATE TIMESTAMP)
COMPRESSION='GZ'

The problem is the compression here is for both column family. As a result,
I will end up compressing pdf, that is lost of efforts.

What do you suggest ?

Thanks

Mime
View raw message