[Serusers] Re: MySQL-Problem (was: LCR question)

Stefan Prelle stefan at prelle.org
Sat Nov 26 16:36:24 CET 2005


Hi Juha,

Am Samstag, den 26.11.2005, 17:17 +0200 schrieb Juha Heinanen:
> are you saying that LIKE operation is much slower that a many exact
> matches?  if so, it looks like a bug in mysql's LIKE implementation.
> have you asked mysql list, why LIKE takes so long?

It definetly is. Try generating a million entries and use the MySQL
command line interface to measure the time for the operation.
A like operation takes about one second, a exact match (if there is an
index for that column) less than 10 ms.

As far as I know the LIKE operation cannot make use of an table index
and thus is a lot slower.
And no, I haven't contacted the mysql list, since I'm not that surprised
by that fact.

Regards,
  Stefan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20051126/2a3c093d/attachment.pgp>


More information about the sr-users mailing list