Google Firestore - Do small operations exist?

Viewed 212

I am evaluating different cloud databases for a new project. I have used Google Cloud Datastore in the past, but now Google seems to recommend I use the newer version called Firestore. In the past with Datastore I was able to do "small operations" which are defined as:

  • Calls to allocate IDs.
  • Keys-only queries. A keys-only query is counted as a single entity read for the query itself. The individual results are counted as small operations.
  • Projection queries that do not use the distinct on clause. This type of query is counted as a single entity read for the query itself. The individual results are counted as small operations

For example, if I had 1000 blog posts and I needed to only retrieve the title of each post, I could do a projection query at a cost of 1 read. With the newer Firestore I do not see this feature in the documentation. This would mean it would now cost me 1000 reads to do the same operation. Is this feature still there, or is it simply just not documentation? In the past I also used projection queries for things such as aggregation of votes, etc, so this a quite popular feature I would imagine among many applications.

2 Answers

There is no such billing feature as "small operations" in Firestore. For queries, a a document is either read or not. You are charged for the number of documents read and returned to the client, with a minimum cost of 1. There are no projections for mobile and web clients - either the entire document is read, or not at all. There are projections for server SDKs, but they still cost an entire read.

Related