I don't know how to make LIKE faster. I've heard that MySQL has full
text indexing and searching built in and with SQL Server you can use
"Full Text Indexing", but it is a bit more complicated to set up,
maintain, and query than I would like, but it does work. You have to
use a "full text" searching query ("CONTAINS") and not LIKE.
Mark
-----Original Message-----
From: James Smith [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 13, 2007 11:56 AM
To: CF-Talk
Subject: RE: Conditional SQL
As a last resort this procedure does the following...
SET @searchTerm = '%' + REPLACE(@searchTerm,' ','%') + '%'; ..
...
...
AND (Title LIKE @searchTerm OR ArtistName LIKE @searchTerm)
So that is someone searches for 'friends series 7' it is first turned
into '%friends%series%7%' which will match the title 'friends complete
series - 7' (for example). This is however, very slow. Is there a way
to speed up this sort of LIKE matching?
--
Jay
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Create Web Applications With ColdFusion MX7 & Flex 2.
Build powerful, scalable RIAs. Free Trial
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJS
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:281038
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4