N1QL taking far longer in .NET than command line


I’m trying to run N1QL queries from the .NET SDK and seemingly the exact same query returns quickly (~200ms) from the command line tool cbq, but either times out or takes forever from the .NET SDK (usually hits the timeout at around 1m 15s).

I am using version 2.2.8 from the SDK. I’m trialling Couchbase Server 4.1.1 (4.1.1 actually seems worse than 4.0). There are around 4 million documents in the database, each with 2 replicas.

I’m running the query select * from `bar-data` where type = "Event"; in the command line and the following query in the .NET SDK (taken from the ToString method).

{<url removed>:8093/query[{"statement":"SELECT * FROM `bar-data` WHERE type = $type","timeout":"75000ms","$type":"Event","client_context_id":"13::15"}]}

The result returned from the .NET SDK actually usually shows the same number of documents (808) but a status of Timeout and Success = false. I have tried setting ScanConsistency to RequestPlus and NotBounded - neither have any effect.

Any clue why this might be happening? I’m really stuck and don’t know what to try next.

1 Like

@molexmat -

Can you post the logs? Can you describe your architecture (cloud, localhost, dc, etc)?


1 Like