Reading here I cannot find a clear answer: http://www.postgresql.org/docs/9.1/static/storage-toast.html

I need to know if setting storage to EXTERNAL for a particular column, I can gain a little performance. Most of my data is retrieved from SHARED_BUFFERS.

I'm curious to know if decompression is done for every query working on that field.

1 Answer 1


Yes, they are.

shared_buffers is block-oriented, and stored in the same format as on-disk.

This is generally good for performance, since the decompression is very fast, and the compression means that more fits in shared_buffers. The only case it might hurt is if you have enough storage to fit the whole dataset in shared_buffers uncompressed too.

  • Yes, I have a lot of memory dedicated to postgresql and some xml data of few megabytes. A lot of queryes are eating cps, so I'm going to uncompress this data. Thank you.
    – user_0
    Aug 21, 2015 at 13:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.