Hai Bi
Hai Bi

Reputation: 1173

Is it a good idea to use many namespaces in GAE datastore?

I have about 500 folder entities to be stored in GAE. I want to categorize them into 6 groups. Can I use 6 different namespaces to distinguish them? So that I create the entity using new Entity(groupname, foldername);

The other way is new Entity("Folders", groupname+"/"+foldername); so that they share one namespace but use different keynames.

I am wondering whether many namespaces take a lot of memory? Which way is better?

Upvotes: 1

Views: 105

Answers (1)

dragonx
dragonx

Reputation: 15143

Depends if you will ever want folders in different namespaces to be returned in the same query. You won't be able to do that with namespaces, you'll need to issue a separate query per namespace.

Upvotes: 2

Related Questions