For the best chance to have a efficient query you would need to loose the
leading "%" if possible.
If you could then the query can optimize using a index.
On Sun, Dec 4, 2011 at 2:50 PM, Reindl Harald <h.reindl@stripped>wrote:
> you THINK the engine is? WTF?
> fulltext if you need fulltext-search
> please read the manuals i linked!
> Am 04.12.2011 21:20, schrieb Rafael Valenzuela:
> > Hi Reindl,
> > Thanks for your quick answer, but i think the engine is MySAM but I'm
> > sure, What type of index recomendais me, unique, full-text, etc..?
> > Thanks a lot
> > 2011/12/4 Reindl Harald <h.reindl@stripped>
> >> Am 04.12.2011 20:25, schrieb Rafael Valenzuela:
> >>> Hi all,
> >>> In one query, I am comparing a string with a 'like=%patron%', but is
> >> very
> >>> slow and expensive .What is the best way to compare a string? like or
> >>> regular expression?
> >>> The data base is too big table 1TB, any idea?
> >>> thanks a lot
> >> http://dev.mysql.com/doc/refman/5.5/en/fulltext-search.html
> >> without indexes is big tables is no fast search possible
> >> if you are useing innodb you have currently lost