-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add an aggregated velocity statistics table #24
base: main
Are you sure you want to change the base?
Conversation
I tried to run this query manually for a single day by adding WHERE date >= '2024-12-01' and date < '2024-12-02'
extrapolating to all the data we have - which currently is ~2 years the total number of rows will be 20,000 * 730 = 14,600,000 because it's a materialized view which stores all its rows and taking into account the indices, this will add significant size to the DB. Also, the load on the DB for running the materialized view refresh needs to be taken into account, we will need to run it periodically. I think because the basic query takes 10 seconds per day, and assuming it won't run very often it's worth to just run the query itself, or maybe add a non-materizlied view. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
^
Thank you! |
Hi @OriHoch ! I came out with this proposal to implement some kind of cache mechanism. the last used column will store the last time a specific date was calculated. It will be used to remove old entries from the DB. I made an implementation for the API and tested it locally |
|
No description provided.