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

Re: array vs flat tables performance

From: "Oren Mazor" <oren(dot)mazor(at)gmail(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: array vs flat tables performance
Date: 2005-08-30 14:40:32
Message-ID: op.swbsduk5v14azh@oren-mazors-computer.local (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
this is just for closure.

the array is actually stored as a string by postgres. a string that  
happens to have lots of brackets in it. you only get processing overhead  
when you convert this string into a datastructure that makes sense for  


On Mon, 29 Aug 2005 14:43:30 -0400, Oren Mazor <oren(dot)mazor(at)gmail(dot)com>  

> 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:
> UID7 - {ITEM12}
> is the latter simply syntactic sugar for the former?
> thanks
> Oren

Oren Mazor // Developer, Sysadmin, Explorer
GPG Key:
"Ut sementem feceris, ita metes"

In response to

pgsql-novice by date

Next:From: Mike G.Date: 2005-08-30 16:22:18
Subject: Copy function syntax on 8.1
Previous:From: Jaromír KamlerDate: 2005-08-30 06:30:29
Subject: Fwd: Re: Fwd: Re: question - plpgsql and query on table given by variable

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