You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We noticed the cost_per_query model seems to over-allocate cost to some queries.
I think the issue comes from the incremental logic in this line. This line returns a timestamp. Later in the model, cost is attributed based on the hour the query falls into. When the timestamp generated in L34 is close to the hour (e.g. 03:57). In this case, all warehouse cost for the hour between 3:00 and 4:00 will be allocated to the queries that ended between 03:57 and 4:00 (which causes an over-allocation as there won't be many queries that occur in this space of 3mins).
Aggregated query cost per day using the incremental materialization we have been running for ~4 months gives quite different results from a table materialization.
Let me know if you would like me to investigate further and raise a PR. Thanks so much!!
The text was updated successfully, but these errors were encountered:
Hey there!
We noticed the
cost_per_query
model seems to over-allocate cost to some queries.I think the issue comes from the incremental logic in this line. This line returns a timestamp. Later in the model, cost is attributed based on the hour the query falls into. When the timestamp generated in L34 is close to the hour (e.g. 03:57). In this case, all warehouse cost for the hour between 3:00 and 4:00 will be allocated to the queries that ended between 03:57 and 4:00 (which causes an over-allocation as there won't be many queries that occur in this space of 3mins).
Aggregated query cost per day using the incremental materialization we have been running for ~4 months gives quite different results from a table materialization.
Let me know if you would like me to investigate further and raise a PR. Thanks so much!!
The text was updated successfully, but these errors were encountered: