MAIN vs. PLAIN - Mailing list pgsql-performance

From Dave Held
Subject MAIN vs. PLAIN
Date
Msg-id 49E94D0CFCD4DB43AFBA928DDD20C8F902618465@asg002.asg.local
Whole thread Raw
Responses Re: MAIN vs. PLAIN
List pgsql-performance
I notice that by default, postgres sets numeric fields to
storage MAIN.  What exactly does that mean?  Does that mean
it stores it in some type of compressed BCD format?  If so,
how much performance gain can I expect by setting the storage
to PLAIN?  Also, the docs say that char(n) is implemented more
or less the same way as text.  Does that mean that setting
a field to, say, char(2) PLAIN is not going be any faster
than text PLAIN?  That seems a bit counter-intuitive.  I
would hope that a char(2) PLAIN would just reserve two chars
in the record structure without any overhead of pointers to
external data.  Is there a reason this isn't supported?

__
David B. Held
Software Engineer/Array Services Group
200 14th Ave. East,  Sartell, MN 56377
320.534.3637 320.253.7800 800.752.8129

pgsql-performance by date:

Previous
From: John A Meinel
Date:
Subject: Re: Help with tuning this query (with explain analyze finally)
Next
From: stig erikson
Date:
Subject: Re: name search query speed