I am using the following query, UPDATE
bucket USE KEYS “myKey” SET
field = “updatedValue” and I am really surprised by the execution time of it, which is around 870ms on a average of 10 execution!
When I run with EXPLAIN, it is using the keyScan, which, I think is correct as the key is provided in the n1QL query directly.
I am really surprised by this performance, as it should just do a direct access to the document… It seems to me that it will be faster for me to do a bucket.get(“myKey”), change the document and then bucket.upsert().
Any idea why this is so slow? There are 50000 documents in my bucket and a primary index exist. The test is run against a 1 node cluster on a local vagrant, with version 4.0 GA.
I also found out that a simple select, like SELECT
bucket USE KEYS “myKey” is taking on average 35ms when I guess doing a bucket.get(“myKey”) and then only returning the filed in there will be a lot quicker too