Re: What is the best way to do attribute/values?

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: What is the best way to do attribute/values?
Дата
Msg-id 412BAC80.4050507@archonet.com
обсуждение исходный текст
Ответ на What is the best way to do attribute/values?  (Daniel Ceregatti <vi@sh.nu>)
Список 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 по дате отправления:

Предыдущее
От: Josh Berkus
Дата:
Сообщение: Re: What is the best way to do attribute/values?
Следующее
От: my ho
Дата:
Сообщение: Re: postgresql performance with multimedia