marshallpenguin
marshallpenguin

Reputation: 177

Datastore API Calls vs Datastore Queries

In Quota Details (appengine dashboard) there are two items under the Storage section.

Datastore API Calls with a limit of 141,241,791

Datastore Queries with a limit of 417,311,168

What is the difference between these two? And why is the latter's limit 3x larger?

Upvotes: 3

Views: 450

Answers (2)

Jason Hall
Jason Hall

Reputation: 20920

To supplement Wooble's great answer, here's what the docs say:

Datastore API Calls

The total number of times the app retrieved, created, updated or deleted an entity, or performed a query in the datastore.

Datastore Queries

The total number of times the app has performed a datastore query. Note that some query interface operations (IN and !=) perform multiple datastore queries; each individual query counts toward this quota.

So yeah, API calls include all retrievals, updates, deletions, creations, and queries, essentially anything calling the datastore. Only queries are counted for the other quota, which is why it's 1/3rd the size.

Upvotes: 0

Wooble
Wooble

Reputation: 89897

Fetching entities from the datastore or writing entities to the datastore are API calls, and neither requires a query. Remember, the datastore does not use SQL; a "query" is only done when you're searching for entities whose index entries match your criteria, not for any other operation.

Upvotes: 2

Related Questions