I need to create a large amount of records which relate three other
entities.  Just for example, take 100 people; 100 days; and 100
restaurants.  To create a record for an intersection of a person/day/
restaurant, it's possible to create keyname of person.key()+day.key()
+restaurant.key().  And to retrieve records, it's easy to generate a
list of keys and use a db.get().

In the internet somewhere, I read a comment by Nick Johnson saying
that long keynames are inefficient, and that it can be a good idea to
use a MD5 or SHA1 hash function to shorten the key name.  My question
is, how expensive are the MD5 and SHA1 functions?

For example, if I need to generate 100 keys for each view (e.g. to
retrieve people who visited 1 restaurant in 1 day, I can generate 100
keys and db.get() that list) - is it cheaper to use the MD5 hash to
keep key_names shorter?  Or is the cost of generating the hashes more
than any savings from shortening the keys?




-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to