Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-17422

Change in custom field search behaviour impacting on performance

    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
    • 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.

        Attachments

          Activity

            People

            • Assignee:
              eileen Eileen McNaughton
              Reporter:
              eileen Eileen McNaughton
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: