Re: Significantly larger toast tables on 8.4?

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: Significantly larger toast tables on 8.4?
Дата
Msg-id 20090102224815.GA29489@svana.org
обсуждение исходный текст
Ответ на Re: Significantly larger toast tables on 8.4?  ("Robert Haas" <robertmhaas@gmail.com>)
Ответы Re: Significantly larger toast tables on 8.4?  ("Gregory Maxwell" <gmaxwell@gmail.com>)
Список pgsql-hackers
On Fri, Jan 02, 2009 at 03:35:18PM -0500, Robert Haas wrote:
> Any compression algorithm is going to require you to decompress the
> entire string before extracting a substring at a given offset.  When
> the data is uncompressed, you can jump directly to the offset you want
> to read.  Even if the compression algorithm requires no overhead at
> all, it's going to make the location of the data nondeterministic, and
> therefore force additional disk reads.

So you compromise. You split the data into say 1MB blobs and compress
each individually. Then if someone does a substring at offset 3MB you
can find it quickly. This barely costs you anything in the compression
ratio mostly.

Implementation though, that's harder. The size of the blobs is tunable
also. I imagine the optimal value will probably be around 100KB. (12
blocks uncompressed).

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Please line up in a tree and maintain the heap invariant while
> boarding. Thank you for flying nlogn airlines.

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

Предыдущее
От: Joe Conway
Дата:
Сообщение: Re: dblink vs SQL/MED
Следующее
От: "Greg Stark"
Дата:
Сообщение: Re: posix_fadvise v22