Right now I'm having a performance issue with this query :
select userid from table_x inner join table_y on array_contains(split(table_y.userids,','),cast(table_x.userid as string))
The userids on y is represented as a string of numbers "123, 134, 156" which actually means three userids, namely 123,134 and 156. Table_x has a userid columns which details the personal information of each user. I want to select the userid which is contained in the userids column in table_y.
Am I right in assuming that the reason for the perforamance issue is because I have to convert the userids in table_y to array of string using split(table_y.userids,',') and use array_contains for string. If so, is there anyone who knows how to convert the string of userids into array of integer?
Thank you!