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)).
|2022-06-15 22:27:49||reviewbot||set||messages: + msg77107|
nosy: + reviewbot
status: in-progress -> testing
Showing 10 items. Show all history (warning: this could be VERY long)