Re: postgresql storage and performance questions

Alvaro Herrera <alvherre@alvh.no-ip.org>

From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Josh Harrison <joshques@gmail.com>
Cc: Trevor Talbot <quension@gmail.com>, pgsql-general@postgresql.org
Date: 2007-11-20T12:49:54Z
Lists: pgsql-general
Josh Harrison escribió:

> > On 11/19/07, Josh Harrison <joshques@gmail.com> wrote:
> >
> > > I have 2 tables with 2 cols each( 1 numeric(8,0) and 1 varchar(3) ).
> > > In table1 both the cols are filled and in table2  the varchar colm is null

> There were a couple of things we noted.
> 1. Tablesize twice as much than oracle-- Im not sure if postgres null
> columns has any overhead since  we have lots of null columns in our
> tables.Does postgresql has lots of overhead for null columns?

No, NULLs are stored as a bitmap for each tuple and they are quite
efficient.

Probably the reason for the difference is the numeric field which Oracle
may be optimizing as a plain integer.   Did you try declaring the column
as INTEGER in Postgres?


Please do not top-post.

-- 
Alvaro Herrera                  http://www.amazon.com/gp/registry/5ZYLFMCVHXC
"Everything that I think about is more fascinating than the crap in your head."
                               (Dogbert's interpretation of blogger philosophy)