Thread: Design question: Using Array datatypes

Design question: Using Array datatypes

From
"Mr. Tomcat"
Date:
I noticed that PG supports arrays.  I noticed also that one of the rules
of DB normalization is "no repeating fields".  It seems like using
arrays would violate that.  I have a particular need that would benefit
from using arrays.  There will be no need to search elements in the
array, so it seems like a good place to use it.  What are opinions on
array usage?  Is it a horrible misfeature, never to be used, or is it
the right way to go in some situations?  I have never used arrays in a
db design.

Thanks for an opinions on this.


Re: Design question: Using Array datatypes

From
Oleg Bartunov
Date:
On 23 Sep 2002, Mr. Tomcat wrote:

> I noticed that PG supports arrays.  I noticed also that one of the rules
> of DB normalization is "no repeating fields".  It seems like using
> arrays would violate that.  I have a particular need that would benefit
> from using arrays.  There will be no need to search elements in the
> array, so it seems like a good place to use it.  What are opinions on
> array usage?  Is it a horrible misfeature, never to be used, or is it
> the right way to go in some situations?  I have never used arrays in a
> db design.
>
> Thanks for an opinions on this.

contrib/intarray is what you need. We use arrays extensively and rather
happy. It's not a "repeating fields", it's a field with "repeating elements"

>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/users-lounge/docs/faq.html
>

    Regards,
        Oleg
_____________________________________________________________
Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83


pg_attribute

From
"Andrew Bartley"
Date:
It takes a long time to vacuum this table...  Both "vacuum" and "vacuum
full".

It does not appear to be a big table.  Can I speed it up somehow?

Thanks

Andrew


Re: pg_attribute

From
Martijn van Oosterhout
Date:
On Tue, Sep 24, 2002 at 04:22:04PM +1000, Andrew Bartley wrote:
> It takes a long time to vacuum this table...  Both "vacuum" and "vacuum
> full".
>
> It does not appear to be a big table.  Can I speed it up somehow?

Paste the output of VACUUM VERBOSE ANALYSE.

Thanks,

--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> There are 10 kinds of people in the world, those that can do binary
> arithmetic and those that can't.