Issue 11486

Title
Use implicit join for where clause on Many2One
Priority
feature
Status
testing
Nosy list
ced, reviewbot
Assigned to
ced
Keywords
review

Created on 2022-05-13.19:44:02 by ced, last changed 1 week ago by reviewbot.

Messages

Author: [hidden] (ced) Tryton committer Tryton translator
Date: 2022-05-13.19:44:01

The subquery in the form of column IN (SELECT id FROM ...) can be very slow because they are often SubPlan. This means that they are evaluated for each row. So this has a complexity of O(n^2).
But as we do that only on id which is the primary key we could limit the subquery to fetch only one id per row using a clause like: column IN (SELECT id FROM ... WHERE ... AND id = column). The complexity thanks to the index becomes O(n log(n)).

History
Date User Action Args
2022-06-15 22:27:49reviewbotsetmessages: + msg77107
2022-05-13 19:53:48reviewbotsetmessages: + msg76634
nosy: + reviewbot
2022-05-13 19:46:05cedsetkeyword: + review
reviews: 415121003
status: in-progress -> testing
2022-05-13 19:44:02cedcreate

Showing 10 items. Show all history (warning: this could be VERY long)