Hi ,
Below query is taking more time instead of indexes.Please suggest indexes or any change in query
SELECT META(m).id, m.sch_name AS name
FROM `bucket` AS m
UNNEST m.pri_sch_ref AS r WHERE m.dtype = "mprisch"
AND r IN( SELECT RAW META(a).id FROM `bucket' AS a UNNEST a.prod_prof AS p UNNEST p.fee_prof AS f UNNEST f.spl_fee AS s WHERE a.dtype = "prisch"
AND (f.fee_sch = "46" OR s.fee_sch = "46") )
ORDER BY name ASC