SwiftPackageIndex-Server icon indicating copy to clipboard operation
SwiftPackageIndex-Server copied to clipboard

Review double `from` clause in `keywordMatchQueryBuilder`

Open finestructure opened this issue 3 years ago • 1 comments

See https://github.com/SwiftPackageIndex/SwiftPackageIndex-Server/pull/1933#discussion_r933990451

Potential bug that might not give wrong results but I suspect it selects N(search view rows) x (N keywords) rows without a join and filters on the product when we really want to filter just on keywords.

finestructure avatar Jul 31 '22 13:07 finestructure

This is actually what prompted the distinct in that query. The question really is if this is as inefficient as it sounds or if there's a better way to write this query, for instance by keeping the keywords array inline and testing it via <@ or some other "contains" operator variant.

finestructure avatar Jul 31 '22 14:07 finestructure

Going to close this for now, it's not really worth exploring at the moment.

finestructure avatar Aug 17 '22 13:08 finestructure