Re: Naming-scheme for db-files - Mailing list pgsql-general

From Alvaro Herrera
Subject Re: Naming-scheme for db-files
Date
Msg-id Pine.LNX.4.44.0208281203580.2175-100000@cm-lcon1-46-187.cm.vtr.net
Whole thread Raw
In response to Re: Naming-scheme for db-files  ("Markus Wollny" <Markus.Wollny@computec.de>)
List pgsql-general
Markus Wollny dijo:

> Yes, I run vacuum every night - and log-output indicates no errors at
> all. Yet I am indeed quite puzzled about the size of this table. Is
> there some way of finding out which column consumes so much space?

[lots of NUMERIC in table description]

NUMERIC is not the best thing to use for the most of these cases.  Use
INTEGER where you want a number (user_id, etc), or better yet SERIAL
(see the docs for implications).

Where you want boolean values, use BOOL.  Where you want multiple
choice, use "char" (with the ""); that gives you a 1-char space.

This way the table will be probably not only way smaller, but faster as
well.

--
Alvaro Herrera (<alvherre[a]atentus.com>)
"El que vive para el futuro es un iluso, y el que vive para el pasado,
un imbécil" (Luis Adler, "Los tripulantes de la noche")


pgsql-general by date:

Previous
From: Dan Ostrowski
Date:
Subject: Noobie Questions...
Next
From: "scott.marlowe"
Date:
Subject: Re: Performance Tuning / RAM Usage