REGEXP seems to be much slower than LIKE in SQL. We ran the slow queries at the mysql prompt. Then converted the queries to use LIKE instead of REGEXP and they run much faster. Not knowing exactly what the REGEXP is trying to do, but here's what we get:
Using REGEXP:
SELECT product_id FROM prefx_hikashop_product WHERE product_alias REGEXP '^ *the.+love.+that.+was.+lost.+womens.+long.+sleeve.+hooded.+t.+shirt *$' OR product_name REGEXP '^ *the.+love.+that.+was.+lost.+womens.+long.+sleeve.+hooded.+t.+shirt *$'
+
+
| product_id |
+
+
| 126875 |
+
+
48.853 seconds
Using LIKE:
SELECT product_id FROM prefx_hikashop_product WHERE product_alias LIKE 'the%love%that%was%lost%womens%long%sleeve%hooded%t%shirt%' OR product_name LIKE 'the%love%that%was%lost%womens%long%sleeve%hooded%t%shirt%'
+
+
| product_id |
+
+
| 126875 |
+
+
2.783 seconds
These two queries bring back the same product_id value. When would LIKE not work and bring back the wrong value(s) for product_id?