What is maximum size/limitation of ListProperty for Google App Engine datastore?

天涯浪子 提交于 2019-12-05 17:39:34

@marcadian has a pretty good answer. There's no limit specifically on a ListProperty.

You do need to look at datastore limits on entities though: https://developers.google.com/appengine/docs/python/datastore/#Python_Quotas_and_limits

The two most obvious limits are the 1MB maximum entity size and 20000 index entries.

Depending on what's inside your list, it may vary. You can fit 130k 8-byte long's within that 1MB limit, but if they're indexed, you'll hit a barrier at 20k entries because of the index limit.

The worst bit is that these limits are on the total entity size, so if you have two lists in an entity, the size of one list could be limited by the what's in the other list.

I've a list of 20K strings (not indexed though). I don't think there is limitation on the length, but there is limitation on each entity size. Be careful on indexing multi value properties, it could be expensive.

Dmytro Sadovnychyi

30 will be fine.

Guido's answer about related question: https://stackoverflow.com/a/15418435/1279005 So up to 100 repeated values will be fine.

Repeated properties much easier to understand by using NDB as I think. You should try it. It's does not matter if you using it with Long or String properties - if the property is indexed you'll be able to filter by it.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!