From: | "Announce" <truthhurts(at)insightbb(dot)com> |
---|---|
To: | "Postgres Novice" <pgsql-novice(at)postgresql(dot)org> |
Subject: | Text Searching? |
Date: | 2005-10-10 03:23:13 |
Message-ID: | KBEKKNMFLELKGIADDEPEMEEPCBAA.truthhurts@insightbb.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Fuhr | 2005-10-10 03:55:18 | Re: Text Searching? |
Previous Message | Michael Fuhr | 2005-10-10 02:32:26 | Re: stupid SQL question, how reach different rows of two almost same tables |