I’m adding every word of text or hashtags to array list. What’s the logical limit for mongo arrays? How many objects should i add max?
My array is indexed. And only have one array field per object.
I’m adding every word of text or hashtags to array list. What’s the logical limit for mongo arrays? How many objects should i add max?
My array is indexed. And only have one array field per object.
From the docs:
Parse Objects are limited in size to 128 KB.
In addition, the general limits of MongoDB BSON documents apply.
Edit: The object size limitation has been removed in Parse open source.
Hi @Manuel. Thank you. But Can bigger array list decrease performance? I mean 10 object array and 1000 object array. does query performance is same? when they are indexed?
It depends on which performance you look at, object size always have some kind of performance implication, just to mention a few:
select
command in the Parse SDKs.My objects are generally smaller than 2KB. Is this ok?
@Manuel in open source version of parse, the limit of 128KB on Parse Object no longer exists. But I totally agree with you, having big objects will lead to massive issue on query/network performance.
@uzaysan, if you array will contain 1 to X objects depending of a user input in 99% of the time you should switch it to a Relation style.
An exception could be to use an hidden array ( never retreived to final user via exclude option ) for some smart meta searching engine needs ( I already used this type of array with 100 elements into the array for powerful text searching on a Parse Object )
To minimize bandwidth exchange on both user and backend size, using the GraphQL API is a good option since GraphQL optimize and only retrieve needed fields. We also added on the backend implementation some optimization to only extract from the database needed fields for the query response: so a win for your users and a a win for you ( performance and less network traffic )
Uh, that totally missed my radar, but thanks for correcting, it’s still all over the docs, I will open a PR.
Omg. That’s what I’m doing right now. Except i didn’t use exclude option but i will use it from now. Glad to hear that I’m in the right path.