Better yet, check the the MySQL docs and confirm whether or not there is a difference in speed between "=" and "LIKE". If there is I'd bet it's because LIKE forces a sequential read of the index, if not the column.
I don't see how using a regex would be any faster? Happy to be proved wrong. Miles Thompson At 07:16 AM 12/7/2001 +0200, Andrey Hristov wrote: >you can use REGEXP instead of like. > > >Regards, >Andrey Hristov >----- Original Message ----- >From: <[EMAIL PROTECTED]> >To: <[EMAIL PROTECTED]> >Sent: Friday, December 07, 2001 5:40 AM >Subject: [PHP-DB] Replace like > > > > Can anyone tell me how would i replace the following query with a "=" > > > > SELECT * from table_name WHERE name LIKE "%name%"; > > > > I want to have the same functionality like "LIKE" but having no LIKE > word in > > it. > > Basically i want it for a search engine and i heard that using LIKE > decreases > > the speed like nothing as compared to "=" > > > > -TIA > > Sharmad > > > > -- > > PHP Database Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > > > > > >-- >PHP Database Mailing List (http://www.php.net/) >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] >To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]