MySQL Forums
Forum List  »  Optimizer & Parser

Re: Can anyone help speed up this query?
Posted by: Øystein Grøvlen
Date: June 22, 2017 01:18AM

Hi,

Not sure if it is the major contributor to the execution time, but I think there is a significant overhead with each MATCH function and you should try to limit the number of times you call it. For example, instead of

MATCH(column1) AGAINST ('+term1' IN BOOLEAN MODE) OR
MATCH(column2) AGAINST ('+term2' IN BOOLEAN MODE)

I think you can write

MATCH(column1, column2) AGAINST ('term1 term2' IN BOOLEAN MODE)

It seems you are implementing your own ranking scheme. Have you considered whether the ranking scheme provided by NATURAL LANGUAGE MODE would be sufficient for your needs?

Øystein Grøvlen,
Senior Principal Software Engineer,
MySQL Group, Oracle,
Trondheim, Norway

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Can anyone help speed up this query?
546
June 22, 2017 01:18AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.