Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

I am using GAE long time but can not find what is maximum length of ListProperty.

I was read documentation but not found solution I want to create ListProperty(long) to keep about 30 values of long or more. I want use this field as filter - can I use it similar to StringListProperty?

What is size limits of ListProperty(long)?

like image 258
Chameleon Avatar asked Nov 25 '13 18:11

Chameleon


3 Answers

@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.

like image 140
dragonx Avatar answered Nov 17 '22 17:11

dragonx


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.

like image 28
marcadian Avatar answered Nov 17 '22 18:11

marcadian


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.

like image 1
Dmytro Sadovnychyi Avatar answered Nov 17 '22 16:11

Dmytro Sadovnychyi