Hi Team
We have a query as below:
SELECT IFMISSINGORNULL(SUM(ARRAY_COUNT(ARRAY 1 FOR m IN migrations WHEN m.status = “SUCCESS” END)),0)
FROM promotions AS commandStatus WHERE commandStatus._class
= “XXX.YYYY.ZZZZ”
AND commandStatus.eventType = “CL” AND commandStatus.requestDuplicated = false
AND commandStatus.createdDateTime BETWEEN 1587137280000 AND 1587160200000
The index that is being picked up is as below:
CREATE INDEX legacy_createdDateTime_eventType_extId_array_migrations_success_class_requestDuplicated_false ON
promotions
(createdDateTime
,eventType
, extId
, array_count(array 1 for m
in (migrations
) when ((m
.status
) = ‘SUCCESS’) end))
PARTITION BY HASH(extId)
WHERE _class
= ‘XXX.YYYY.ZZZZ’
AND requestDuplicated
= false
using GSI WITH {“num_replica”: 1,“num_partition”:6} ;
Can you guys help me understand why using java SDK the query is timing out after running for 6 mins but in workbench it is executing fine with in 12s?
Couchbase Server = 6.0.2
Couchbase java Client = 2.7.9
Regards,
Venkat