In function runs really slow

Hard to say for certain without an MWE, but you should probably construct a set to look up the values you want to check against:

transactions[in(Set(articles.article_id)).(transactions.article_id), :]
3 Likes