Re: Replace like
| From: | Sharmad Naik | Date: | Sat, 08 Dec 2001 14:14:59 +0000 |
| Subject: | Re: Replace like | ||
| References: | 1 2 3 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-14886@lists.php.net to get a copy of this message | ||
You are right, It is slow b'cause it forces sequential search. I don't
see REGEXP as a ans to this.
Sharmad
On Fri, Dec 07, 2001 at 09:07:01AM -0400, Miles Thompson wrote:
>
> 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.
>
>
> At 07:16 AM 12/7/2001 +0200, Andrey Hristov wrote:
> >you can use REGEXP instead of 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: php-db-unsubscribe@lists.php.net
> > > For additional commands, e-mail: php-db-help@lists.php.net
> > > To contact the list administrators, e-mail: php-list-admin@lists.php.net
> > >
> > >
> >
> >
> >--
> >PHP Database Mailing List (http://www.php.net/)
> >To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
> >For additional commands, e-mail: php-db-help@lists.php.net
> >To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
> For additional commands, e-mail: php-db-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
--
Feel free to contact me (flames about my english and the useless of this
driver will be redirected to /dev/null, oh no, it's full...).
(Michael Beck, describing the PC-speaker sound device)
---------------------
__ _ _ _ _
|_|_||_||_||\/||_|| \
_|| || || \| || ||_/
"What we cannot speak about we must pass over in silence."
Ludwig Wittgenstein (1889-1951), Austrian philosopher