NYCPHP Meetup

[nycphp-talk] MySQL WHERE clause question

DeWitt, Michael mjdewitt at alexcommgrp.com
Fri May 9 10:38:45 EDT 2003


Pinyo,

Yes, I believe it is slower, but it's harder to say if it matters. For me,
on my sites, I don't notice it just as it hard to notice the difference, for
example, between 0.1 sec and 0.3 seconds.  

The value it brings in handling string searches sanely is worth it.  It
seems that the SQL language was never constructed for these kinds of queries
and the LIKE operator can only do so much. 

The "hairy" aspect of this issue is writing the parser that constructs the
query to do the searching. Which columns, noise words, phrases, word rooting
and logical combinations of words and phrases are some of the aspects that
have to be addressed (or not, you can always punt).  

Mike 

> -----Original Message-----
> From:	Bhulipongsanon, Pinyo [SMTP:Pinyo.Bhulipongsanon at usa.xerox.com]
> Sent:	Friday, May 09, 2003 9:36 AM
> To:	NYPHP Talk
> Subject:	RE: [nycphp-talk] MySQL WHERE clause question
> 
> Hi Mike,
> 
> I thought full-text search is considerably slower.
> 
> Pinyo
> 
> -----Original Message-----
> From: DeWitt, Michael [mailto:mjdewitt at alexcommgrp.com]
> Sent: Friday, May 09, 2003 9:29 AM
> To: NYPHP Talk
> Subject: RE: [nycphp-talk] MySQL WHERE clause question
> 
> 
> Another approach to this issue is to use MySQL's full text ability.
> Details
> can be found at http://www.mysql.com/doc/en/Fulltext_Search.html
> 
> Mike
> 
> > -----Original Message-----
> > From:	John Adair [SMTP:jadair at adairservices.net]
> > Sent:	Thursday, May 08, 2003 11:29 PM
> > To:	NYPHP Talk
> > Subject:	RE: [nycphp-talk] MySQL WHERE clause question
> > 
> > "Select * Where Description Like 'ford %' or like '% ford' or like '%
> ford
> > %'"
> > 
> > the first like finds 'ford ' at the beginning of the description.
> > the second like finds ' ford' at the end of the description.
> > and the last like finds the word 'ford' within the body that is
> surrounded
> > by spaces.
> > 
> > I'm not the best at SQL though.
> > 
> > -----Original Message-----
> > From: Jeff [mailto:jsiegel1 at optonline.net]
> > Sent: Thursday, May 08, 2003 11:01 PM
> > To: NYPHP Talk
> > Subject: [nycphp-talk] MySQL WHERE clause question
> > 
> > 
> > This question concerns how to format a "WHERE" clause so that it only
> > finds those records that have a particular word buried within the text.
> > For example, if my WHERE clause has "DE_sDescription LIKE "%ford%" it
> > will return records that have the word "affordable" in the description
> > field. But if I remove the wild cards, then it doesn't find those
> > records that may have the word "ford" buried within a text (the text
> > runs 500 characters at the max).
> > 
> > Any pointers would be *greatly* appreciated.
> > 
> > Jeff
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> 
> 
> 
> 
> 
> 
> --- Unsubscribe at http://nyphp.org/list/ ---
> 



More information about the talk mailing list