开发者

Google App Engine Objectify querying big objects VS separated objects (head and body)

I have one entity object (kind) for storing all information from user's "advertisement". It includes keys for photographs, contact information and so on. But I need only few things from all this to query the object.

Using Google App Engine (Java) with Objectify.

My question is this. Is it more po开发者_如何学Cwerful to have entity object just for queries ("head" - with Title, Price, City) and another entity object to all extra unindexed details? Or is it ok to have all this in one entity object and just tag other properties as unindexed?


It is fine to have the details on the same kind, it will save you from needing additional trips to the datastore. As you noted, it is a good idea to mark any properties you do not need to query or order by as unindexed since it improves write performance and reduces storage space.

You might find the articles on mastering the datastore useful. They explain more of the details about how entities and indexes are built and stored.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜