hail icon indicating copy to clipboard operation
hail copied to clipboard

[batch] Use the new aggregated by date billing tables

Open jigold opened this issue 1 year ago • 2 comments

Stacked on #12006

This PR actually uses the new tables within the client application. The billing page should now load quickly. Note that the old aggregated billing tables are still in the database and being populated.

The key thing to note is I switched how we are computing the cost. First, I aggregate the usage by resource before multiplying by the resource rate and summing. Therefore, the old and new numbers should be close, but not identical in the UI.

The reviewer should double check that there are no references to aggregated_*_resources$ tables (the ones that do not have the date interval) within the application code.

jigold avatar Jul 03 '22 23:07 jigold

cc: @danking

jigold avatar Jul 08 '22 15:07 jigold

I checked all the queries are fast now even with the common table expressions.

jigold avatar Aug 10 '22 18:08 jigold

I'll retry the PR Monday morning. Let's not merge on a Friday.

jigold avatar Aug 19 '22 21:08 jigold