Why a simple query is slow on nodejs?

Ahh ok thanks,

but how can I configure the idle timeout ? I see all timeouts but not idle

The behavior I described was for the Java SDK. The nodejs could be different.

For nodejs - it looks like you figured this out from your post in another thread …

If you care about performance use key value operations, n1ql is still slow and will probably be slow forever.
The only performant method of querying is to use views but it seem they are planning to deprecate them.

Query will not be as fast as kv, because of the processing the statement and also because the result may need to be fetched from other nodes. But there are many things a query can do that kv cannot.

If you know document key use KV ops. Still some reason need to use N1QL (Further filtering, join, aggregates etc) use as USE KEYS avoid index, indexscan

SELECT click FROM products USE KEYS $1

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.