Request has exceeded memory quota issue

Hi,
My query giving “Request has exceeded memory quota” how can i solve this problem
SELECT
variant.variantValueId
,variant.variantValueName
,COUNT(variant.varaiantValueId) as variantCount
from B2CData._default.CatalogProducts AS t
UNNEST t.categories AS cat
UNNEST t.variants AS variant
WHERE
cat.categoryDetailId=415
GROUP BY
variant.variantValueId
,variant.variantValueName

Ps; I’m using trial cluster

Along with the error you should see a “metrics” section (presuming you’re using the Query Workbench); does it include a “usedMemory” figure?

How many documents does your statement produce?

SELECT COUNT(1)
FROM B2CData._default.CatalogProducts AS t
UNNEST t.categories AS cat
UNNEST t.variants AS variant
WHERE cat.categoryDetailId=415

And how large is the average B2CData._default.CatalogProducts document ?

SELECT COUNT(1), AVG(LENGTH(json_encode(t))) 
FROM B2CData._default.CatalogProducts AS t

And matching document?

SELECT AVG(LENGTH(json_encode(t))), AVG(ARRAY_LENGTH(t.categories)),  AVG(ARRAY_LENGTH(t.variants))
FROM B2CData._default.CatalogProducts AS t
UNNEST t.categories AS cat
UNNEST t.variants AS variant
WHERE cat.categoryDetailId=415

What index do you have to support the query (if any)?

Hi,
Query 1 Result : 1.110
Query 2 Result: “$1”: 6893,“$2”: 3076.271144639489
Query 3 Result: “$1”: 3947.4684684684685,“$2”: 3,“$3”: 4.589189189189189

Thanks. I believe your issue is being addressed through other channels.