Re: Compression and on-disk sorting

Поиск
Список
Период
Сортировка
От Albe Laurenz
Тема Re: Compression and on-disk sorting
Дата
Msg-id 52EF20B2E3209443BC37736D00C3C1380876BEF5@EXADV1.host.magwien.gv.at
обсуждение исходный текст
Ответ на Compression and on-disk sorting  ("Jim C. Nasby" <jnasby@pervasive.com>)
Ответы Re: Compression and on-disk sorting
Список pgsql-hackers
Andrew Piskorski wrote:
>>> Rod Taylor wrote:
>>>>Disk storage is cheap. Disk bandwidth or throughput is very
expensive.
>
> Oracle has included "table compression" since 9iR2.  They report table
> size reductions of 2x to 4x as typical, with proportional reductions
> in I/O, and supposedly, usually low to negligible overhead for writes:

[...]

> The main tricks seem to be:  One, EXTREMELY lightweight compression
> schemes - basically table lookups designed to be as cpu friendly as
> posible.  Two, keep the data compressed in RAM as well so that you can
> also cache more of the data, and indeed keep it the compressed until
> as late in the CPU processing pipeline as possible.

Oracle's compression seems to work as follows:
- At the beginning of each data block, there is a 'lookup table' containing frequently used values in table entries (of
thatblock). 
- This lookup table is referenced from within the block.

There is a White Paper that describes the algorithm and contains
praise for the effects:
http://www.oracle.com/technology/products/bi/pdf/o9ir2_compression_perfo
rmance_twp.pdf

Oracle does not compress tables by default.
This is what they have to say about it:

Table compression should be used with highly redundant data, such as
tables
with many foreign keys. You should avoid compressing tables with much
update
or other DML activity. Although compressed tables or partitions are
updatable,
there is some overhead in updating these tables, and high update
activity
may work against compression by causing some space to be wasted.

Yours,
Laurenz Albe


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

Предыдущее
От: "Gurjeet Singh"
Дата:
Сообщение: Re: audit table containing Select statements submitted
Следующее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: Compression and on-disk sorting