Skip to content
Snippets Groups Projects
Commit 3d32e996 authored by Olivier Dony's avatar Olivier Dony
Browse files

[FIX] mail.thread: optimize lookup of res.users by email

Searching on res.partners with domain [('user_ids' , '!=', False)]
will currently be translated into a huge "ID IN <...>"  query,
with the IDs of all existing users.
On a database with a lot of users, this can be measured
in seconds (e.g. 3-4 seconds with 500k+ users),
leading to significant delays in email delivery.

Using a direct lookup in res.users is more direct and faster.
parent 4432639f
Branches
Tags
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment