Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Major
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.6.9
-
Fix Version/s: 4.7
-
Component/s: None
-
Labels:
-
Documentation Required?:None
-
Funding Source:Core Team Funds
Description
On upgrading a site with a large data set to 4.6 we found that the searches on custom field data are now unacceptably slow - gone from 1 second to 1 minute.
The reason for this is a behaviour change somewhere since 4.5 (probably in 4.6 but I verified against 4.4 not 4.4 for previous behaviour).
I am specifically looking at a text field in advanced search.
I enter | 4.4 I get | 4.4 I get |
---|---|---|
bob | ='bob' | LIKE '%bob%' |
bo% | LIKE 'bo%' | LIKE '%bob%' |
My suspicion is that this change was an unintentional side-effect of code consolidation rather than an intentional change @monish.deb @colemanw @dgg any idea?
Note that the mysql rationale for the problem is that the index only works on the portion up until the first '%' so an '%' at the start creates a non-indexed filter.