Hey all, could anyone point me to some reading that could help me with my current project - I've got a large database of financial data that I'd like to aggregate to a single endpoint/database for analytics data (total revenue etc, a collation of the data). Is it better to do this on the fly, or would a function serve best? 🙂
n
Needle
05/07/2022, 3:34 AM
Hello @dolmios!
This thread has been automatically created from your message in #843999948717555735 a few seconds ago.
We have already mentioned the @User so that they can see your message and help you as soon as possible!
Want to unsubscribe from this thread?
Right-click the thread in Discord (or use the ``...`` menu) and select "Leave Thread" to unsubscribe from future updates.
Want to change the title?
Use the ``/title`` command!
We have solved your problem?
Click the button below to archive it.
Needle
05/07/2022, 3:35 AM
🆕 Aggregating database to simple endpoint - best practice
d
dolmios
05/07/2022, 3:36 AM
I'm currently achieving this on the fly by combining the data from the database on the client side, though this seems intensive. The data doesn't need to be real-time, so fetching from an "analytics" database would be preferential. Not sure if this is a loaded question, I'm still super new. ❤️
g
garyaustin
05/07/2022, 3:45 AM
I think I would look at it from a security stand point and then a convenience to you coding.
If you don't want intermediate data on the client then rpc function call can provide back just the data you want using a Postgres function. But it is probably easier to maintain client code to do your "aggregation" if you have a single client code base. Next would cost of bringing large amounts of data from the database to the client at cost, versus "aggregation" at the database server level and so less data transfer to the client.
n
Needle
05/07/2022, 3:45 AM
Aggregating database to simple endpoint - best practice