Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More DB indexes needed #626

Closed
tbar0970 opened this issue Dec 13, 2019 · 0 comments
Closed

More DB indexes needed #626

tbar0970 opened this issue Dec 13, 2019 · 0 comments

Comments

@tbar0970
Copy link
Owner

Troubleshooting some slow queries I found some FKs that are needed:

alter table service_item add constraint `service_item_serviceid` foreign key (`serviceid`) references `service` (`id`);
alter table service_item add constraint `service_item_serviceid` foreign key (`serviceid`) references `service` (`id`);
alter table service_item add constraint `service_item_componentid` foreign key (`componentid`) references `service_component` (`id`);
alter table service_component add constraint `service_component_cat` foreign key (`categoryid`) references `service_component_category` (`id`);
alter table congregation_service_component add constraint `congregation_service_component_cong` foreign key (`congregationid`) references `congregation` (`id`);
alter table congregation_service_component add constraint `congregation_service_component_comp` foreign key (`componentid`) references `service_component` (`id`);

Need to add these to the installer (and test it still works) as well as to an upgrade script.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant