-
-
Notifications
You must be signed in to change notification settings - Fork 6
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
Speed up forecast value read table #116
Comments
Test results This was done on different gsp locations mean = 7 With no datetime interval [s] mean = 8 I tried to make an index, but it took > 10 mins
|
Could also add index on creation_utc - CREATE INDEX forecast_value_2022_10_created_utc on forecast_value_2022_10(created_utc DESC) It took 20 mins, but maybe it could have been quicker |
Other option
|
Would be good to bench makr against production to check the changes are doing the desired effect |
Above 3. should mean that there is atmost 7 days of data to read. This should make the fast to load. Lets review in 1 weeks time |
Detailed Description
Currently takes ~ 6 seconds for each GSP to read forecast value table when looking at a X hour forecast.
Query at the momment is
We have already partitation this table, but there are about 36 million rows per month. This means by the end of the month, its a bit slow. ~ 6 seconds per query. Note if you query again its quicker (this is how SQL works)
Context
Possible Implementation
1 . add a column to a partition table,
ALTER TABLE forecast_value ADD datetime_interval_id int;
2 . update and add datetime_intervals
3 . then run updated query, to see if it speeds up. If it does, can then add it in
The text was updated successfully, but these errors were encountered: