bytea characteristics

Started by jeff sackstederabout 19 years ago2 messagesgeneral
Jump to latest
#1jeff sacksteder
jsacksteder@gmail.com

Are there any known guidelines regarding storing images in a bytea
column vs simply storing the meta-data?

Do the images take up a certain percentage more space due to the on-
disk format when stored this way?

#2Peter Eisentraut
peter_e@gmx.net
In reply to: jeff sacksteder (#1)
Re: bytea characteristics

jws wrote:

Do the images take up a certain percentage more space due to the on-
disk format when stored this way?

Bytes are pretty much stored just as bytes, with four bytes of overhead
for the length field. Larger values (> 2kB) are stored out of line, so
there really shouldn't be much concern about storing the image data in
the database. It's probably more of a question what makes your
processing easier.

--
Peter Eisentraut
http://developer.postgresql.org/~petere/