Hi! My iOS/Android app is unbelievably slow and I am looking into making some optimizations on the database, so I was wondering… In the scenarios listed below, which one is the better options of the 2? Again; I am optimizing for speed for the users, not scaleability. These scenarios can be generalized, I am very aware that there’s several other factors important when making these decisions, but just looking for speed input. I would love input from people with technical knowledge, rather than anecdotal experiences.
Scenario 1: You want to label different types of images (fixed labels) and visually show a label in the front-end. Is it faster to
- Create a text property automatically assigning 1 of 7 strings + filtering on “String = X” in the front-end.
- Create 7 boolean fields and show label based on “Boolean=TRUE”
Scenario 2: In the front-end you want to show a list of pictures and a list of files (separately)…Is it faster to
- Create 1 database property (document) with a text field to identify image or file and generating 2 lists of documents, filtering on the type.
- Create 2 database properties and generating 2 different lists in the front-end
Scenario 3: You want users being able to leave reactions on images.
Is it faster to
- Store the reactions as a new database collection and link it to the image collection. In the UI you create a list view on the current image.
- Create more properties on the image collection. In the UI, you can immediately use the fields on the current image.
(In general is it preferred to have parent-child relationships OR store a bunch more fields on the parent)
Thank you!