-
Notifications
You must be signed in to change notification settings - Fork 262
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
perf(db): optimise indices of mail tables #9295
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please comment out the index creation in the migration that added the indices originally
I commented out the index creation of the indices to drop. It would be possible to also comment out the creation of the indices that are replaced and add the new ones in the migration, to have new instances up to date without "occ missingindices". The Migration will have a lot of checks in this case, which can be confusing. What do you think? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and works. I'd suggest to keep the new indices out of old migrations to keep it clean.
Signed-off-by: Johannes Merkel <mail@johannesgge.de>
29a83e7
to
4c356d6
Compare
Hello there, We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process. Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6 Thank you for contributing to Nextcloud and we hope to hear from you soon! |
Fix: #9162
Needs nextcloud/server#43209 to also replace indices.
What should happen:
oc_mail_messages
structure_analyzed
->mail_messages_strucanalyz_idx
mail_messages_mailbox_id
becausemail_messages_mb_id_uid
already containsmailbox_id
on first positionmail_messages_mb_id_uid
unique ->mail_messages_mb_id_uid_uidx
oc_mail_classifiers
created_at
->mail_class_creat_idx
oc_mail_accounts
provisioning_id
->mail_acc_prov_idx
oc_mail_smime_certificates
mail_smime_certs_uid_idx
to cover(user_id,email_address)
->mail_smime_certs_uid_email_idx
mail_smime_certs_id_uid_idx
oc_mail_tags
mail_msg_tags_usr_id_index
becausemail_msg_tags_usr_lbl_idx
already containsuser_id
on first positionoc_mail_aliases
account_id
->mail_alias_accid_idx
oc_mail_trusted_senders
(user_id,email,type)
and dropmail_trusted_senders_type
->mail_trusted_senders_idx
oc_mail_coll_addresses
(user_id, email, display_name)
and dropmail_coll_addr_userid_index
andmail_coll_addr_email_index
->mail_coll_idx