Re: [GENEAL] dynamically changing table

From: David Fetter <david(at)fetter(dot)org>
To: A B <gentosaker(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: [GENEAL] dynamically changing table
Date: 2009-03-30 18:04:06
Message-ID: 20090330180406.GH30580@fetter.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Mar 30, 2009 at 05:39:19PM +0200, A B wrote:
> Hi,
> In the next project I'm going to have a number of colums in my tables,
> but I don't know how many, they change.

Stop right there. You need to get some sanity into your project,
either by changing that requirement, or by not using an RDBMS for it.

Cheers,
David.
> They all use integers as
> datatype though.. One day, I get 2 new columns, a week later I loose
> one column, and so on in a random pattern.
>
> I will most likely have a few million rows of data so I just wonder if
> there are any problems with running
> alter table x add column .....
> or
> alter table x drop column .....
>
> Adding a column, will it place data "far away" on the disc so that
> select * from x where id=y will result in not quite optimal
> performance since it has to fetch columns from a lot of different
> places?
> Will deleting a column result in a lot of empty space that will anoy
> me later on?
>
> Are there any other clever solutions of this problem?
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general

--
David Fetter <david(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
Skype: davidfetter XMPP: david(dot)fetter(at)gmail(dot)com

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Michael Black 2009-03-30 18:33:44 FW: [GENEAL] dynamically changing table
Previous Message A B 2009-03-30 17:17:23 Re: [GENEAL] dynamically changing table