we got 650k records on table CUSTOMER_USER and this has become the bottleneck for the performance of our system. Analyzing slow queries log we can see that almost every query that surpasses 10s is a customer search. This is due to the inefficient statement used by OTRS (there are reasons to do so, I'm not criticizing) to perform such searches.
It uses a statement like this:
Code: Select all
SELECT
login,
cf_soggetto,
last_name,
first_name,
denom_sogg_rappr,
email
FROM
customer_user
WHERE
((first_name LIKE '%boofoogoo%'
OR last_name LIKE '%boofoogoo%'
OR cf_soggetto LIKE '%boofoogoo%'
OR phone LIKE '%boofoogoo%'))
AND valid_id IN (1)
LIMIT 250;
Where can we made this change in order to achieve our goal? I thought that /Kernel/System/CustomerUser.pm could be the proper module but I can't find - favoured by my perl ignorance - the proper point.
Any help appreciated, thanks.
Luca