TOAST compression

Поиск
Список
Период
Сортировка
От Neil Conway
Тема TOAST compression
Дата
Msg-id 1140921574.8830.105.camel@localhost.localdomain
обсуждение исходный текст
Ответы Re: TOAST compression  (Bruce Momjian <pgman@candle.pha.pa.us>)
Re: TOAST compression  ("Jim C. Nasby" <jnasby@pervasive.com>)
Re: TOAST compression  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
toast_compress_datum() considers compression to be "successful" if the
compressed version of the datum is smaller than the uncompressed
version. I think this is overly generous: if compression reduces the
size of the datum by, say, 0.01%, it is likely a net loss to use the
compressed version of the datum since we'll need to pay for LZ
decompression every time that we de-TOAST it. This situation can occur
frequently when storing "mostly-uncompressible" data (compressed images,
encrypted data, etc.) -- some parts of the data will compress well (e.g.
metadata), but the vast majority will not.

It's true that LZ decompression is fast, so we should probably use the
compressed version of the datum unless the reduction in size is very
small. I'm not sure precisely what that threshold should be, however.

Comments?

-Neil




В списке pgsql-hackers по дате отправления:

Предыдущее
От: James William Pye
Дата:
Сообщение: Re: Pl/Python -- current maintainer?
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: TOAST compression