Reputation: 737
Two firebase performance questions:
Docs refer to flat data is best practice when constructing data. However, if I wish to retrieve a few nodes of data together (a JOIN query in SQL), this means a few network requests. Is Firebase optimizing such use case (in server/client side)? How?
When fetching a specific node, using its full path, is there any need of indexing it? (Docs refer to actual queries, and I'm not sure this case applies as a query)
Thanks
Upvotes: 1
Views: 112
Reputation: 598728
Doing a "client-side join" in Firebase is not nearly as expensive as you might expect. See this answer: Speed up fetching posts for my social network app by using query instead of observing a single event repeatedly
If you directly access the node (only calling new Firebase()
and child()
), no query is needed, so you won't need an index. If you're calling orderByChild()
or orderByValue()
you should add an index.
Upvotes: 1