Skip to content
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

Refactor hourly pnl tables #77

Open
2 tasks
Tburm opened this issue Jul 1, 2024 · 0 comments
Open
2 tasks

Refactor hourly pnl tables #77

Tburm opened this issue Jul 1, 2024 · 0 comments

Comments

@Tburm
Copy link
Collaborator

Tburm commented Jul 1, 2024

The core system contains a complex set of tables to calculate pnls for each collateral type in each pool. There are likely optimizations can be made in these tables to simplify the calculation and enable more efficient materialization. The complex queries result in long query times and large join in order to "forward fill" data.

Although this was originally designed to calculate incrementally, some data quality issues arose so it was reverted to a table materialization. It should be possible to use incremental materialization here to speed up the dbt build.

Tasks:

  • Review and optimize hourly pnl tables in the core system: fct_pool_pnl_hourly, fct_pool_rewards_hourly, fct_pool_issuance
  • Optimize query times and reenable incremental table materialization if possible
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant