1

Let's say there's 2 million rows in a firebase table and I want to initialise a search index. If I'm using NodeJS & Mongo I could stream the query so we're not trying to load so many rows into memory before writing them out to the search index in batches.

How would I efficiently process all the records with Firebase? Are paging queries the best option? Or is there a way to stream the records with a single query?

Richard G
  • 4,549
  • 10
  • 44
  • 86
  • The Firebase Database API is designed for streaming approaches. Ad-hoc querying (such as generating a search index after you've already added 2 millions child nodes) is not a good match for the API. See my answer here for some guidelines: https://stackoverflow.com/questions/39712833/firebase-performance-how-many-children-per-node – Frank van Puffelen Jun 02 '17 at 07:55

0 Answers0