Setting Index on a Relationship Table

In order to improve the performance of some mysql queries, we’ve modified some indices on a few security group relationship tables. We did this directly on the database. Every time we run a repair, it wants to reset those indices. I’m sure those definitions are stored somewhere. Can someone point me in the right direction of where those are? These are relationship tables between security groups and a few custom modules we created in module builder.

You can find relationship table definition at metadata/ or custom/metadata

@4T_dev

Look at tables in DB:

  • relationships - list of relationships
  • for Security Groups
    – securitygroups_acl_roles
    – securitygroups_audit
    – securitygroups_default
    – securitygroups_records - I think you are looking for this table.
    – securitygroups_users

Ok great thank you! And I can modify these directly in these files?

@4T_dev

Yes, but you should consider that you changing in directory ‘metadata/’ will be lost if you upgrade SuiteCRM. It is safer to use the directory ‘custom/metadata’. You can override system relationships also there.

Thank you again. I appreciate the assistance.