0

I've used "select from X.class.getName()" to get all records of class X, but if there is a lot of records, it might take a long time to get the results.

I just want a count of how many records are there in the Datastore, what's the fastest query to get this number ? Is there something like "select COUNT() X.class.getName()" that can return , for example, 234000 [ the count of all records ] ?

Wooble
  • 87,717
  • 12
  • 108
  • 131
Frank
  • 30,590
  • 58
  • 161
  • 244

1 Answers1

0

See What's the best way to count results in GQL?

(short answer is that you should store the amount of object and update it whenver you add/remove objects from the datastore)

Community
  • 1
  • 1
Uri
  • 25,622
  • 10
  • 45
  • 72