问题
If I perform a query to delete a document that does not exist in my firestore database, will I be charged for the delete operation, read operation or will not be charged at all?
回答1:
Please refer to the documentation.
If you make a query, you will be charged a read for each document returned by the request, regardless of what you do with it.
If you attempt to delete the document from a query, you will be charged a delete if the delete actually succeeds in deleting that document. Document delete operations that don't actually delete a document are not billed. You will not be charged for an additional read, as described by the docs:
when a document is deleted, you are not charged for a read
回答2:
It sounds like you will be charged based off of reading this. Even though they don't say "delete", this makes it seem like you will be charged: "There is a minimum charge of one document read for each query that you perform, even if the query returns no results." Now if you receive an error doing the operation you should not be charged. I would recommend testing this with very small amounts of data at first just to make sure though, the fee is only $0.02 per 100,000 deletions.
来源:https://stackoverflow.com/questions/59123560/firestore-pricing-for-deletion