I am using MySQL. I have asked a question about how to query in database for a single word match here.
There is an answer which suggest me to use
REGEXP '[[:<:]]word[[:>:]]'
It is a good answer, however, I am not sure how is this
REGEXP '[[:<:]]word[[:>:]]'
thing from performance perspective? If I have a large table, is this way harm the performance of my application?
For example, compare with =
operation, e.g. WHERE column_name='value'
, is the REGEXP
operation far more slow than =
for large table?
There is another answer which suggested me to use LIKE, but I think it is not good from performance point of view.
Then, I googled and found an article which says use
LIKE
is even faster thanREGEXP
. I get confused, which way I should use for a single word match query in a large table...
Can I say, =
is the fastest operation, then LIKE
, and REGEXP
is the poorest one from performance perspective?