Closed aclavio closed 3 years ago
Also investigate if cts.estimate
would be accurate enough and performant.
eg:
const numInStateEst = (status, state) =>
cts.estimate(
cts.andQuery(
[].concat(
baseQuery,
cts.jsonPropertyValueQuery('name', name),
cts.jsonPropertyValueQuery('status', status),
cts.jsonPropertyValueQuery('state', state)
)
),
'document'
);
Switch from
fn.count
based approach in thegetStateMachineCounts
function to utilizing thects.countAggregate()
calculation. This is much more performant on large datasets.eg: