I wonder about search in Firebase database and try to understand if this is a good approche or how to change it. the "andromeda-planetgroup.123-local1001-1234548"
below is an immutable id string and I would like to perform searches on the list containing them. What I think is a problem is that if this list of "PROPERTY"
have hundred miljons entries and performing a range query.
If I create a range query like this:
ref.startAt("andromeda-planetgroup.123-local1001-1234548")
.endAt("andromeda-planetgroup.123-local1001-1234552~")
What can I expect in terms of speed if the list have miljons of entries. I understand that if the range query return miljons if entries it would be slow because of the data size, but lets say I want to return 10 entries in this range query?
"PROPERTY" : {
"andromeda-planetgroup.123-local1001-1234548" : {
"id" : "-KgeKdD94HomnhGHd4WC"
},
"andromeda-planetgroup.123-local1001-1234549" : {
"id" : "-KgeKh28NIFusAfTU_gS"
},
"andromeda-planetgroup.123-local1001-1234550" : {
"id" : "-KgeKmZsuB92uIJqQWq9"
},
"andromeda-planetgroup.123-local1001-1234551" : {
"id" : "-KgeLI417b3E--MAoLY1"
},
"andromeda-planetgroup.123-local1001-1234552" : {
"id" : "-KgeM5K4V1Ytcw4_gGU-"
...
...
...
...
"milkyway-planetgroup.4423-local901-836743" : {
"id" : "-KgeLd5JH-ffdeOOY1"
},
"milkyway-planetgroup.4423-local901-836744" : {
"id" : "-Kg39e7Gjsa&4_Ksu-"
}
If this is a bad ide how can I make this fly better?