Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
C
Core
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 920
    • Issues 920
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Operations
    • Operations
    • Incidents
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
  • Development
  • Core
  • Issues
  • #2057

Closed
Open
Opened Sep 22, 2020 by eileen@eileen🎱Owner

Extraneous queries - activiies

Per #2033 (closed) when doing query analysis on creating 7 contacts with 7 contributions I found that around 10% of the queries were looking up activity contacts.

In other words 2 queries for each record type for each contribution. In fact these are new contributions so no existing records exist & that can hopefully be pre-determined

Examples

timestamp query seconds rows found columns requested
15/09/20 2:54 SELECT * FROM civicrm_activity_contact WHERE ( civicrm_activity_contact.activity_id = 112183025 ) AND ( civicrm_activity_contact.contact_id = 46011835 ) AND ( civicrm_activity_contact.record_type_id = 2 ) 0.000549 0 0
15/09/20 2:54 SELECT * FROM civicrm_activity_contact WHERE ( civicrm_activity_contact.activity_id = 112183025 ) AND ( civicrm_activity_contact.record_type_id = 1 ) 0.000606 0 0
15/09/20 2:54 SELECT * FROM civicrm_activity_contact WHERE ( civicrm_activity_contact.activity_id = 112183025 ) AND ( civicrm_activity_contact.record_type_id = 2 ) 0.000725 0 0
15/09/20 2:54 SELECT * FROM civicrm_activity_contact WHERE ( civicrm_activity_contact.activity_id = 112183025 ) AND ( civicrm_activity_contact.record_type_id = 2 ) 0.000605 1 1
15/09/20 2:54 SELECT * FROM civicrm_activity_contact WHERE ( civicrm_activity_contact.activity_id = 112183025 ) AND ( civicrm_activity_contact.record_type_id = 3 ) 0.000636 0 0
To upload designs, you'll need to enable LFS and have admin enable hashed storage. More information
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: dev/core#2057