Page MenuHomePhabricator

Add indexes to CiviCRM entity financial transaction table
Closed, ResolvedPublic2 Story Points

Description

This is a semi-blocker to T116317 as it causes the queries to be slow & annoying to work with & do testing on. Basically there are some indexes we need to add.

The main challenge with adding indexes is that they then get added by upgrade later & we either get duplicates or it causes the upgrade to fail.

I'm going to catch up with Tim on that see

https://issues.civicrm.org/jira/browse/CRM-17775

Event Timeline

Eileenmcnaughton claimed this task.
Eileenmcnaughton raised the priority of this task from to Needs Triage.
Eileenmcnaughton updated the task description. (Show Details)
Eileenmcnaughton added a subscriber: Eileenmcnaughton.
Restricted Application added subscribers: StudiesWorld, Aklapper. · View Herald TranscriptJan 6 2016, 4:05 AM

I have been doing some digging & I think the indexes are possibly OK on this table and the query that I was seeing poor performance on is not used outside the upgrade script.

Actually this is the unacceptable query

SELECT * FROM civicrm_financial_item WHERE entity_id = 13107948\G

Change 268044 had a related patch set uploaded (by Eileen):
Back port changes to support altering indexes in an upgrade-proof way

https://gerrit.wikimedia.org/r/268044

Change 268044 merged by Ejegg:
Back port changes to support altering indexes in an upgrade-proof way

https://gerrit.wikimedia.org/r/268044

Eileenmcnaughton closed this task as Resolved.Feb 16 2016, 12:25 AM

Self closing this as it is a subtask I logged

Change 285819 had a related patch set uploaded (by Eileen):
Back port changes to support altering indexes in an upgrade-proof way

https://gerrit.wikimedia.org/r/285819

Change 285819 merged by Eileen:
Back port changes to support altering indexes in an upgrade-proof way

https://gerrit.wikimedia.org/r/285819