Object C
11. (Challenge) Create an index or indexes to optimize performance of this query.
I tried to create index
create index idx_rating on couchmusic2(
array rating.username for rating in ratings end, array rating.rating for rating in ratings end)
where type = ‘track’
But the query doesnt use index and is very slow
SELECT artist, genre, title, id
FROM couchmusic2
use index(idx_rating)
WHERE type = ‘track’
AND ANY rating in ratings SATISFIES
rating.username = ‘conwormish43746’ AND rating.rating = 5 END