Text Searching?

Поиск
Список
Период
Сортировка
От Announce
Тема Text Searching?
Дата
Msg-id KBEKKNMFLELKGIADDEPEMEEPCBAA.truthhurts@insightbb.com
обсуждение исходный текст
Ответы Re: Text Searching?  (Michael Fuhr <mike@fuhr.org>)
Список pgsql-novice
I have a couple of best practice questions for doing web searches on
Postgres tables.  Let's say I have a table of employees with A LOT of rows
that I would like to regularly do searches on (from a PHP web page, etc):


EMPLOYEES (table)
--------------------------------
empl_id        pri key
firstname        text or varchar
middlename        text or varchar
lastname        text or varchar
fullname        text or varchar  (firstname+middle+lastname)

Contrived, I know. ANYWAY...

A. Any suggestions for doing full-text searches in Postgres? I have some
primitive ideas of how to do this, but from what I can see, using LIKE
together with an expression that starts with "%" does not make use of the
indexes I have created. How can I set myself up to perform the fastest
possible search?

B. How should the fields be defined? Should they be VARCHAR with a character
limit or just TEXT,etc?

Thanks,

Aaron


В списке pgsql-novice по дате отправления:

Предыдущее
От: Michael Fuhr
Дата:
Сообщение: Re: stupid SQL question, how reach different rows of two almost same tables
Следующее
От: Michael Fuhr
Дата:
Сообщение: Re: Text Searching?