Closed benclmnt closed 3 years ago
An idea to improve the performance of this query is to store an additional array of I_ID
s in Order
table, create an index of (O_W_ID, O_D_ID, O_C_ID) STORING ([I_ID])
and then count the array length of the similar item_ids is >= 2
This is a literal translation of the requirement and runs very slowly (~5s)