1
votes

I am creating a server for an app with a Notifications table which will have A LOT of records (about 100 million records) but only two small values in each record. From what I understand, the name of the Datastore Entity is part of the Entity key and it looks as if the key gets longer with longer Entity names, so I am guessing it is not hashed to the same length for all names? Is this true? Will storage increase with long names?

If so, can I tell Objectify (3.x) what the Entity name in Datastore will be or do I need to rename my classes?

1

1 Answers

2
votes

Initially I wrote that space used by keys is not being counted toward your quota because I heard something like that in one of the Google I/O videos. After extensive googling I can't find any info that would confirm this. So I think we should assume the longer the names of your entities the more you'll pay.

You can define name of the entity in annotation's attribute

@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.TYPE})
public @interface Entity
{
    /**
     * Controls the actual kind name used in the datastore.
     */
    String name() default "";
}