From: | "Jean-Yves F(dot) Barbier" <12ukwn(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-novice(at)postgresql(dot)org |
Subject: | Re: bytea and text |
Date: | 2009-11-26 16:12:31 |
Message-ID: | 4B0EA8EF.3050500@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
Tom Lane a écrit :
> "Jean-Yves F. Barbier" <12ukwn(at)gmail(dot)com> writes:
>> I'm asking myself what solution for storing pictures is the best:
>
>> * using a BYTEA column type, and having no intrinsic compression gain
>> because a picture it almost every time already compressed,
>
>> * using a TEXT column type, and store a Base64(picture) in it; it should
>> take benefits of intrinsic compression (?).
>
> At best, the compression would get rid of the overhead you added by
> converting to base64. It probably wouldn't completely succeed at that,
> though, meaning the second alternative is always a loser.
>
> regards, tom lane
Yeah I saw that in a simple test: zipping a Base64 file from a picture
(I guess the LZ algo's the same from zip to PG) only crunch it by 25%,
which make the result always bigger than a BYTEA.
Thanks
--
Doubt isn't the opposite of faith; it is an element of faith.
-- Paul Tillich, German theologian and historian
From | Date | Subject | |
---|---|---|---|
Next Message | Jean-Yves F. Barbier | 2009-11-26 22:19:06 | index speed-up and automatic tables/procedures creation |
Previous Message | Tom Lane | 2009-11-26 15:58:01 | Re: bytea and text |