| От | Tom Lane |
|---|---|
| Тема | Re: Storing images as BYTEA or large objects |
| Дата | |
| Msg-id | 1543.1202877296@sss.pgh.pa.us обсуждение |
| Ответ на | Re: Storing images as BYTEA or large objects ("Adam Rich" <adam.r@sbcglobal.net>) |
| Список | pgsql-general |
"Adam Rich" <adam.r@sbcglobal.net> writes:
>>> I have two options for storing this data: As BYTEA or as large objects.
> Is it true that if you update a row containing a large BYTEA value, (even if
> you're not updating the BYTEA field itself, just another field), it requires
> the entire BYTEA value to be copied to a new row (because of MVCC) ? Or is
> this not true because of TOAST?
It is not true. As long as you don't change the toasted value, it
contributes nothing much to the cost of updating the row. All that
has to be copied is a 20-byte pointer structure.
However, if you *do* change the toasted value, it is always updated as a
unit. So if you have use for writing into portions of a large value,
large objects are what you want.
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера