Performance issues with a contains clause in my query (trying to filter by tags)

Hi there,

What is the best way to filter for a tag relation in a query. Where the tags are in two different tables which are joined (university and study_program) from my table review

The tags are in a field "tags" with data type array relation to table "tag":

Currently I am using "overlaps" in my where statement to compare the ids, but that is super slow. The input tag_id is an integer array.

7 replies