Re: [GENERAL] newbie table design question

2009-06-02 Thread Merlin Moncure
2009/6/1 Andrew Smith : > 2009/6/2 björn lundin >> >> > CREATE TABLE "DataImport" >> > ( >> >   "DataImportID" serial NOT NULL PRIMARY KEY, >> >   "Time" timestamp without time zone NOT NULL, >> >   "ID_ABC" integer NOT NULL, >> >   "ID_DEF" integer NOT NULL, >> >   "ID_HIJ" integer NOT NULL, >> >

Re: [GENERAL] newbie table design question

2009-06-02 Thread Grzegorz Jaśkiewicz
On Tue, Jun 2, 2009 at 2:27 PM, Merlin Moncure wrote: > _IF_ arrays fit your requirements, they are an extremely compact and > efficient way to store your data.  The requirements are exact..you > can't update or extract a single piece of data out of a block > efficiently.  While indexing techniqu

Re: [GENERAL] newbie table design question

2009-06-02 Thread Merlin Moncure
On Mon, Jun 1, 2009 at 8:41 AM, Sam Mason wrote: > On Mon, Jun 01, 2009 at 06:53:30AM -0500, Chris Spotts wrote: >> I just finished doing something very close to this - not quite once per >> minute, but close.  I started off with an array of integers and after about >> a month of it, I'm having to

Re: [GENERAL] newbie table design question

2009-06-01 Thread Andrew Smith
2009/6/2 björn lundin > > > CREATE TABLE "DataImport" > > ( > > "DataImportID" serial NOT NULL PRIMARY KEY, > > "Time" timestamp without time zone NOT NULL, > > "ID_ABC" integer NOT NULL, > > "ID_DEF" integer NOT NULL, > > "ID_HIJ" integer NOT NULL, > > etc > > ); > > Perhaps you want

Re: [GENERAL] newbie table design question

2009-06-01 Thread Scott Marlowe
2009/6/1 björn lundin : > >> CREATE TABLE "DataImport" >> ( >>   "DataImportID" serial NOT NULL PRIMARY KEY, >>   "Time" timestamp without time zone NOT NULL, >>   "ID_ABC" integer NOT NULL, >>   "ID_DEF" integer NOT NULL, >>   "ID_HIJ" integer NOT NULL, >>   etc >> ); > > Perhaps you want to not u

Re: [GENERAL] newbie table design question

2009-06-01 Thread björn lundin
> CREATE TABLE "DataImport" > ( >   "DataImportID" serial NOT NULL PRIMARY KEY, >   "Time" timestamp without time zone NOT NULL, >   "ID_ABC" integer NOT NULL, >   "ID_DEF" integer NOT NULL, >   "ID_HIJ" integer NOT NULL, >   etc > ); Perhaps you want to not use the "" around the table and column

Re: [GENERAL] newbie table design question

2009-06-01 Thread Grzegorz Jaśkiewicz
one word, horizontal structure. you are trying to sort 1500 colums, instead of creating 1500 rows per entry... -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] newbie table design question

2009-06-01 Thread Sam Mason
On Mon, Jun 01, 2009 at 06:53:30AM -0500, Chris Spotts wrote: > I just finished doing something very close to this - not quite once per > minute, but close. I started off with an array of integers and after about > a month of it, I'm having to redesign my way out of it. I've had to go the other w

Re: [GENERAL] newbie table design question

2009-06-01 Thread Chris Spotts
gsql-general-ow...@postgresql.org] On Behalf Of Sam Mason Sent: Monday, June 01, 2009 5:00 AM To: pgsql-general@postgresql.org Subject: Re: [GENERAL] newbie table design question On Sun, May 31, 2009 at 11:54:09PM +0800, Andrew Smith wrote: > I'm a beginner when it comes to Postgresql, and have

Re: [GENERAL] newbie table design question

2009-06-01 Thread Sam Mason
On Sun, May 31, 2009 at 11:54:09PM +0800, Andrew Smith wrote: > I'm a beginner when it comes to Postgresql, and have a table design question > about a project I'm currently working on. I have 1500 data items that need > to be copied every minute from an external system into my database. The > ite

Re: [GENERAL] newbie table design question

2009-05-31 Thread Andrew Smith
On Mon, Jun 1, 2009 at 1:25 AM, Tom Lane wrote: > Andrew Smith writes: > > I'm a beginner when it comes to Postgresql, and have a table design > question > > about a project I'm currently working on. I have 1500 data items that > need > > to be copied every minute from an external system into m

Re: [GENERAL] newbie table design question

2009-05-31 Thread Tom Lane
Andrew Smith writes: > I'm a beginner when it comes to Postgresql, and have a table design question > about a project I'm currently working on. I have 1500 data items that need > to be copied every minute from an external system into my database. The > items have a timestamp, an identifier and a

[GENERAL] newbie table design question

2009-05-31 Thread Andrew Smith
Hi all, I'm a beginner when it comes to Postgresql, and have a table design question about a project I'm currently working on. I have 1500 data items that need to be copied every minute from an external system into my database. The items have a timestamp, an identifier and a value. For example: