Skip site navigation (1) Skip section navigation (2)

array vs flat tables performance

From: "Oren Mazor" <oren(dot)mazor(at)gmail(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: array vs flat tables performance
Date: 2005-08-29 18:43:30
Message-ID: op.sv98ysuvv14azh@oren-mazors-computer.local (view raw or flat)
Thread:
Lists: pgsql-novice
I'm about to add another table to the project I'm working on and the  
suggested plan of action is to use arrays. Since performance is an issue,  
I'm wondering, what exactly is the difference?

in other words, I could have a flat table such as:

UID1 - ITEM1
UID1 - ITEM2
UID1 - ITEM3
UID7 - ITEM12

or I could use arrays:

UID1 - {ITEM1,ITEM2,ITEM3}
UID7 - {ITEM12}

is the latter simply syntactic sugar for the former?

thanks
Oren

-- 
Oren Mazor // Developer, Sysadmin, Explorer
GPG Key: http://www.grepthemonkey.org/secure
"Ut sementem feceris, ita metes"

Responses

pgsql-novice by date

Next:From: Alan StangeDate: 2005-08-29 19:11:14
Subject: understanding the interaction with delete/select/vacuum
Previous:From: Jaromír KamlerDate: 2005-08-29 09:13:15
Subject: Fwd: Re: question - plpgsql and query on table given by variable

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group