Hi, I check this again today and it took the index without any issues…query responds within 40ms! I did not updated anything since my last work and when checked in again it works. I encountered such behavior few times things which don’t work starts working after sometime. not sure what could be the reason.
Here is the explain which considers index now and works well
{
“requestID”: “b04510c5-f349-4236-8da8-a496d359c932”,
“clientContextID”: “bc130360-f846-435d-b1fb-1101e59e0615”,
“signature”: “json”,
“results”: [
{
“plan”: {
"#operator": “Sequence”,
"~children": [
{
"#operator": “IntersectScan”,
“scans”: [
{
"#operator": “IndexScan”,
“index”: “tenantPeriodicSchedule_assetId_idx”,
“index_id”: “3c4a1dc1fa02e82”,
“keyspace”: “ic_v10_smalldemo”,
“namespace”: “default”,
“spans”: [
{
“Range”: {
“High”: [
"“asset::4901352"”
],
“Inclusion”: 3,
“Low”: [
"“asset::4901352"”
]
}
},
{
“Range”: {
“High”: [
"“asset::4901356"”
],
“Inclusion”: 3,
“Low”: [
"“asset::4901356"”
]
}
},
{
“Range”: {
“High”: [
"“asset::4901373"”
],
“Inclusion”: 3,
“Low”: [
"“asset::4901373"”
]
}
},
{
“Range”: {
“High”: [
"“asset::4904299"”
],
“Inclusion”: 3,
“Low”: [
"“asset::4904299"”
]
}
},
{
“Range”: {
“High”: [
"“asset::4904302"”
],
“Inclusion”: 3,
“Low”: [
"“asset::4904302"”
]
}
},
{
“Range”: {
“High”: [
"“asset::4907422"”
],
“Inclusion”: 3,
“Low”: [
"“asset::4907422"”
]
}
},
{
“Range”: {
“High”: [
"“asset::4916434"”
],
“Inclusion”: 3,
“Low”: [
"“asset::4916434"”
]
}
},
{
“Range”: {
“High”: [
"“asset::4916441"”
],
“Inclusion”: 3,
“Low”: [
"“asset::4916441"”
]
}
},
{
“Range”: {
“High”: [
"“asset::4916442"”
],
“Inclusion”: 3,
“Low”: [
"“asset::4916442"”
]
}
},
{
“Range”: {
“High”: [
"“asset::4916443"”
],
“Inclusion”: 3,
“Low”: [
"“asset::4916443"”
]
}
}
],
“using”: “gsi”
},
{
"#operator": “IndexScan”,
“index”: “tenantPeriodicSchedule_isDeleted_idx”,
“index_id”: “15ef58f01e144459”,
“keyspace”: “ic_v10_smalldemo”,
“namespace”: “default”,
“spans”: [
{
“Range”: {
“High”: [
“false”
],
“Inclusion”: 3,
“Low”: [
“false”
]
}
}
],
“using”: “gsi”
}
]
},
{
"#operator": “Fetch”,
“as”: “t”,
“keyspace”: “ic_v10_smalldemo”,
“namespace”: “default”
},
{
"#operator": “Parallel”,
"~child": {
"#operator": “Sequence”,
"~children": [
{
"#operator": “Filter”,
“condition”: “(((((t
.type
) = “tenantPeriodicSchedule”) and ((t
.isDeleted
) = false)) and (((t
._sync
).rev
) is not null)) and (((t
.assetId
).id
) in [“asset::4916443”, “asset::4916442”, “asset::4916441”, “asset::4916434”, “asset::4907422”, “asset::4904302”, “asset::4904299”, “asset::4901373”, “asset::4901356”, “asset::4901352”]))”
},
{
"#operator": “InitialProject”,
“result_terms”: [
{
“as”: “_id”,
“expr”: “(meta(t
).id
)”
},
{
“expr”: “(t
.assetId
)”
},
{
“expr”: “(t
.nextFillDate
)”
},
{
“expr”: “(t
.form
)”
}
]
},
{
"#operator": “FinalProject”
}
]
}
}
]
},
“text”: “select meta(t).id _id, t.assetId, t.nextFillDate, t.form from ic_v10_smalldemo as t\r\n where type=‘tenantPeriodicSchedule’ and t.isDeleted=false and _sync.rev is not null and t.assetId.id in [‘asset::4916443’,‘asset::4916442’,‘asset::4916441’,‘asset::4916434’,‘asset::4907422’,‘asset::4904302’,‘asset::4904299’,‘asset::4901373’,‘asset::4901356’,‘asset::4901352’]”
}
],
“status”: “success”,
“metrics”: {
“elapsedTime”: “49.002ms”,
“executionTime”: “49.002ms”,
“resultCount”: 1,
“resultSize”: 10044
}
}