this will help If you have two functions trigger instead of one, you will be billed for two invocation for each onWrite rather than just one. It will always be more expensive. There may be good reasons for splitting it up that make it worthwhile to split it up, so you will have to decide that for your specific case.
With these it helps Your function will get invoked for each and every change at or under the path you specify. There's currently no way to prevent this. Instead of writing each and every change to the database, instead try batching up changes on the client and writing them out in bulk, or saving state periodically.
seems to work fine Its not possible to dynamically deploy a function from within the execution of another function. If you want another function, you will have to define it statically and deploy it with the CLI. If you really need different functionality for various combinations of date parts, it sounds like you will end up making a new function for each possible combination, or just deciding withing a single function what to do with each combination every time it's invoked.