speed up the getArtists function with subquery join