thisbejim / Pyrebase

A simple python wrapper for the Firebase API.
2.05k stars 525 forks source link

Which of the following is efficient and why? #422

Open koushikromel opened 1 year ago

koushikromel commented 1 year ago

As I want to access a specific part(child) of the data in firebase so which is recommended

db.child("<specific_child>").get().val() or db.get().val()

will getting the whole database each time costs or create more traffic in the database when my database is too large. Your response may be helpful in someways so don't hesitate to let me know what you know related to this topic Thanks in advance

bvechiato commented 1 year ago

I'd guess getting the specific child is more efficient because it'd only return data in that child rather than the whole database

koushikromel commented 1 year ago

I'd guess getting the specific child is more efficient because it'd only return data in that child rather than the whole database

Yeah Im already doing the same as you said but i thought lt may be a myth so i raised this question. Thanks for the reply man!