Created on 2022-05-13.19:44:02 by ced, last changed 1 week ago by reviewbot.
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:49 | reviewbot | set | messages: + msg77107 |
2022-05-13 19:53:48 | reviewbot | set | messages:
+ msg76634 nosy: + reviewbot |
2022-05-13 19:46:05 | ced | set | keyword:
+ review reviews: 415121003 status: in-progress -> testing |
2022-05-13 19:44:02 | ced | create |
Showing 10 items. Show all history (warning: this could be VERY long)