How many records / rows / nodes is a lot in Firebase?

前端 未结 1 1497
我寻月下人不归
我寻月下人不归 2020-12-12 00:46

I\'m creating an app where I will store users under all postalcodes/zipcodes they want to deliver to. The structure looks like this:

postalcodes/{{postalcode         


        
相关标签:
1条回答
  • 2020-12-12 01:26

    I'm quite sure Firebase can return 500k nodes without a problem.

    The bigger concerns are how long that retrieval will take (especially in this mobile-first era) and what your application will show your user based on that many nodes.

    A list with 500k rows is hardly useful, so most likely you'll show a subset of the data.

    1. Say you just show the first screenful of nodes. How many nodes will that be? 20? So why would you already retrieve the other nodes already in that case? I'd simply retrieve the nodes needed to build the first screen and load the rest on demand - when/if needed.
    2. Alternatively I could imagine you show a digest of the nodes (like a total number of nodes and maybe some averages per zip code area). You'd need all nodes to determine that digest. But I'd hardly consider it to task of a client application to determine the digest values. That's more something of a server-side task. That server could use the same technology as client-apps (i.e. the JavaScript API), but it wouldn't be bothered (as much) by bandwidth and time constraints.

    Just some ideas of how I would approach this, so ymmv.

    0 讨论(0)
提交回复
热议问题