Re: Why is this query killing me?
| From: | Christian Reiniger | Date: | Wed, 17 Oct 2001 20:29:27 +0000 |
| Subject: | Re: Why is this query killing me? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-71395@lists.php.net to get a copy of this message | ||
On Wednesday 17 October 2001 19:45, Jeff Lewis wrote:
> I am creating an advanced search with PHP and pulling from mySQL and
> here is an example of a query I have built:
>
> SELECT pub, class, startdate, adtext FROM classifieds WHERE (pub='KWR'
> OR pub='GUE') AND (startdate<'17-Oct-01') AND ( adtext LIKE '%
> German
> %' OR adtext LIKE '% car %');
Note: LIKE '%something%' is *slow*
Better use MySQL's fulltext indexing.
--
Christian Reiniger
LGDC Webmaster (http://lgdc.sunsite.dk/)
"use the source, luke." (obi-wan gnuobi)