| От | 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 по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера