Information générale
Titre:
String searches SQL
what is the fastest method to search for strings contained within a field using SQL? For example, I currently use:
(SIMPLE EXAMPLE)
ownername field might contain -> HAROLD D. SMITHE
I want every record that contains the name "SMITH" in table1
I am doing this:
SELECT OWNERNAME from table1 ;
WHERE ownername like '%SMITH%'
I do have and index on the ownername field.
This takes quite sometime to get resultant data back on my 70,000 record table. Is there a more optimized way of doing string searches than the way I'm doing it?
Any suggestions appreciated.
Thanks
john.
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement