Performance of Objectify filter

119 views Asked by At

I have an API based on Google App Engine and the datastore. I am using Java and the Objectify framework. I have an Entity and I want to be able to do some queries involving it. I have one simple question.

Is using .filter() as good (speed, performance, cost) as .id()?

I guess using id() is better when possible but in many cases my client may not have the Entities ids.

1

There are 1 answers

0
Nick On

Id is better than a query, you should design it to be used whenever possible:

  • It is strongly consistent
  • It is faster