[thelist] constructing a good search string/query

Joshua Olson joshua at waetech.com
Tue May 3 11:18:17 CDT 2005


> -----Original Message-----
> From: Dan McCullough
> Sent: Monday, May 02, 2005 3:02 PM

> Guess what?  Its SLOWWWWWWWWWWWWWWWWWWWW!
> :) Not surprised by that.  So what I am looking for is some advice to
> speed it up, and possibly add in some smarts.
> 
> Here is the query.
> select * from search_string where lower(searchstring) like 
> '%"+searchTerm+"%'

Dan,

One quick thought here... the call to Lower probably is not necessary.
Generally speaking, the LIKE comparison is going to be case insensitive.
Removing the call to Lower will unnecessitate (new word?) the strong
operation over every row in the table.

<><><><><><><><><><>
Joshua L. Olson
WAE Tech Inc.
http://www.waetech.com/
Phone: 706.210.0168 

Monitor bandwidth usage on IIS6 in real-time:
http://www.waetech.com/services/iisbm/




More information about the thelist mailing list