Skip to content

perf(internal-address): prefix userId in the idx - #13604

Merged
ChristophWurst merged 1 commit into
mainfrom
perf/internal-address/user-id-idx
Sep 1, 2026
Merged

perf(internal-address): prefix userId in the idx#13604
ChristophWurst merged 1 commit into
mainfrom
perf/internal-address/user-id-idx

Conversation

@hamza221

@hamza221 hamza221 commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Prefix uid from mail_internal_address_uniq to avoid full table scans from

SELECT
  *
FROM
  `oc_mail_internal_address`
WHERE
  `user_id` = ?

馃 AI (if applicable)

  • The content of this PR was partly or fully generated using AI

@hamza221

hamza221 commented Sep 1, 2026

Copy link
Copy Markdown
Contributor Author

/backport to stable5.11

@ChristophWurst ChristophWurst left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Every method in https://github.com/nextcloud/mail/blob/main/lib/Db/InternalAddressMapper.php filters at least by the user id. New ordering makes more sense 馃憤

Signed-off-by: Hamza <hamzamahjoubi221@gmail.com>
@hamza221
hamza221 force-pushed the perf/internal-address/user-id-idx branch from 282f4d5 to f4b88ab Compare September 1, 2026 12:18
@ChristophWurst
ChristophWurst merged commit da34605 into main Sep 1, 2026
48 checks passed
@ChristophWurst
ChristophWurst deleted the perf/internal-address/user-id-idx branch September 1, 2026 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants