Re: What is the best way to do attribute/values? - Mailing list pgsql-performance

From Richard Huxton
Subject Re: What is the best way to do attribute/values?
Date
Msg-id 412BAC80.4050507@archonet.com
Whole thread Raw
In response to What is the best way to do attribute/values?  (Daniel Ceregatti <vi@sh.nu>)
List pgsql-performance
Daniel Ceregatti wrote:
> Hi list,
>
> I have a database with 1M "people" in it. Each person has about 20
> attributes, such as height, weight, eye color, etc. I need to be able to
> search for people based on these attributes. A search can be conducted
> on one attribute, all attributes, or any number in between. How would
> _you_ do this?
>
> I have already attempted to answer this. My attempts are detailed here:
>
> http://sh.nu/email.txt

Hmm... interesting.

Shot in the dark - try a tsearch2 full-text index. Your problem could be
translated into searching strings of the form
   "hair=black eyes=blue age=117"

Not pretty, but might give you the speed you want.
--
   Richard Huxton
   Archonet Ltd

pgsql-performance by date:

Previous
From: Josh Berkus
Date:
Subject: Re: What is the best way to do attribute/values?
Next
From: my ho
Date:
Subject: Re: postgresql performance with multimedia