Re: Compression in PG

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Nov 1, 2009 at 11:53 AM, Shaul Dar <shauldar@xxxxxxxxx> wrote:
> I am aware of the TOAST mechanism (actually complained about it in this
> forum...). The text fields I have are below the limits that trigger this
> mechanism, and also I may want to compress specific fields, not all of them.
> And also I have performance concerns as TOAST splits tables and can
> potentially cause a performance hit on queries.
>
> My question is if PG can compress smaller text fields e.g 0.5-1KB, or must I
> do this outside PG?

The manual explains the behavior of the system fairly clearly.  You
should read it through carefully, since it doesn't seem that you aware
of all the ins and outs (for example, compression and external storage
can be configured independently of one another, and on a per-column
basis).  If it doesn't seem like the behavior you want, then it is
likely that you are trying to solve a different problem than the one
that TOAST is designed to solve.  In that case, you should tell us
more about what you're trying to do.

The only reason I can think of for wanting to compress very small
datums is if you have a gajillion of them, they're highly
compressible, and you have extra CPU time coming out of your ears.  In
that case - yeah, you might want to think about pre-compressing them
outside of Pg.  If you're doing this for some other reason you could
probably get some better advice if you explain what it is...

...Robert

-- 
Sent via pgsql-performance mailing list (pgsql-performance@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance

[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux