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

Slow query - participant report

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.4.4
    • Fix Version/s: 4.5
    • Component/s: None
    • Labels:

      Description

      While writing a custom participant report I noticed the built in one was slow. On looking at the query I noticed the join in the report doesn't match the index - resulting in an unindexed join

      Altering the join from
      LEFT JOIN civicrm_line_item line_item_civireport

      AND line_item_civireport.entity_id = {$this->_aliases['civicrm_participant']}.id
      ";

      to
      LEFT JOIN civicrm_line_item line_item_civireport
      ON line_item_civireport.entity_table = 'civicrm_participant'
      AND line_item_civireport.entity_id = {$this->_aliases['civicrm_participant']}.id
      ";

      fixes this query - although I suspect the join should not have actually been called - in this instance - but I am not investigating that.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: