Hello,
I have been working with Firestore and I need to find out which of the following ways to delete unnecessary data is better in terms of cost:
- First option is to recursively delete all documents from collections until they're empty, I tried doing this for a day and realized that it incurs in entity reading and
entity
deleting costs for Firestore, it would take a really long time to delete everything I need to erase due to the amount of data, and it doesn't seem to lower the data storage quota usage at all.
- Second
option
is to create a new Firestore DB, migrate specific data to it, populate it from that point onwards with data from users, and after a month, delete the old Firestore DB with a CLI command. The process of migrating data would take a while, and I don't know how much it would cost to execute a
firebase firestore:delete --all-collections; I assume it must cost accordingly to the volume of data eliminated, but I'm unsure if it only incurs in entity delete costs, or if it also has entity read costs, like the first option.
Does someone have information regarding this? I would really appreciate it.
Thanks for your time and attention.