Home > database >  Does Firestore document update request run if the value didn't change?
Does Firestore document update request run if the value didn't change?

Time:09-08

I'm quite new to Firebase and I was having this question:

What happens if I run an update request for a Firestore document and the data in the document and the one in the update request are the same? Does that update counts for Firebase billing? Or Firestore automatically detects that the data is the same and don't even run request?

CodePudding user response:

Every update is billed. There are no "free" updates. If you want to avoid an update if nothing changed, you will have to read the document first and determine for yourself if you want to update.

  • Related