we will need to do regular updates on data, and thinking to use UPDATE query to do so. that involves the number of documents from 10 to 20k or more per query. the number of docs will vary. is there any concerns or suggestions or issue with performance that anyone can think of or know about?
would it be any performance issue if we run the UPDATE query with 20k or more documents per time? or we should batch them into say, 5000 per query…
thanks in advance!
example of query can be:
update news
set archived = true
where published_date = ‘20220101’;
ifmissingornull(message, xxx)
First you choose xxx such that it is not part of the documents. example you expect message is string then choose number. avoid null because it can be part of documents.
If you can use index condition then use where ifmissingornull(message, xxx) != xxx
If it must be in index key then use ifmissingornull(message, xxx)