Join Query Taking time

Hi, @vsr1 this query is taking more than 1 second, even though we have an index as suggested by CB, can you help with this ?

WITH instances AS (
SELECT instance.pageId,
FROM bucketName AS instance
WHERE instance.type = ‘instance’
AND instance.clientId = “12345”
AND IN [“1213”,“11212”]) SELECT page,
i.instance AS instance,
META(i.instance).id AS _ID,
META(i.instance).cas AS _CAS
FROM bucketName AS page
JOIN instances AS i ON page.pageId = i.pageId
WHERE page.type = ‘page’
AND page.clientId = “12345”

Indexes Used -
CREATE INDEX index_page_pageId ONbucketName(clientId,pageId) WHERE (type = 'page')

This post was flagged by the community and is temporarily hidden.