N1QL Update vs a mutation via the sdk?

Theoretically what would give better performance if I want to update a single field in a big document.

N1QL update statement or a subdocument mutation via the sdk?


sub document mutation from sdk. N1QL works on whole document

1 Like

Even if I do an update statement like
UPDATE test USE KEYS 'key' SET inactive=true

Does this result in N1QL pulling the whole document, modifying the field and then persist?

I was under the impression that N1QL would do a mutation behind the scenes. Can you confirm please?

N1QL always pulls whole document for update

1 Like