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

Advanced performance issue on state (not using indexes properly)

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.7.2
    • Fix Version/s: 4.7.4
    • Component/s: None
    • Labels:
    • Documentation Required?:
      None
    • Funding Source:
      Contributed Code

      Description

      When doing an advanced search you are forced to specify the country in order to select the state. However

      1) the state resolves to an ID - the country is implicit in that ID
      2) there is no combined index on country and state so only one field or the other will be indexed.

      Rather than indexing both I propose to drop country_id where state_province_id is present, allowing the existing index on state_province_id to be used

        Attachments

          Activity

            People

            • Assignee:
              monish.deb Monish Deb
              Reporter:
              eileen Eileen McNaughton
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: