MAIN vs. PLAIN

From: "Dave Held" <dave(dot)held(at)arrayservicesgrp(dot)com>
To: <pgsql-performance(at)postgresql(dot)org>
Subject: MAIN vs. PLAIN
Date: 2005-03-04 20:59:01
Message-ID: 49E94D0CFCD4DB43AFBA928DDD20C8F902618465@asg002.asg.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Jim C. Nasby 2005-03-04 22:05:07 Re: multi billion row tables: possible or insane?
Previous Message John A Meinel 2005-03-04 19:56:12 Re: Help with tuning this query (with explain analyze finally)