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

Investigate DB optimization #613

Open
franzns opened this issue Dec 21, 2023 · 4 comments
Open

Investigate DB optimization #613

franzns opened this issue Dec 21, 2023 · 4 comments
Assignees

Comments

@franzns
Copy link
Contributor

franzns commented Dec 21, 2023

We'll soon need to run the balancer jobs on a higher interval which will lead to more load on the DB. Would be good to investigate and maybe optimize some queries/writes so we dont need to scale the DB.

@franzns
Copy link
Contributor Author

franzns commented Jan 5, 2024

The update-lifetime-values-for-all-pools job seems to be a heavy, I refactored it a bit and DB usage went down a567a42

@franzns
Copy link
Contributor Author

franzns commented Jan 5, 2024

Need to investigate the COMMIT load, it probably comes from when prismaBulkExecuteOperations() transaction is set to TRUE. Need to check if this is really needed everywhere it's used.

@franzns
Copy link
Contributor Author

franzns commented Jan 5, 2024

for poolsnapshots and token prices, should we use plain s3 or dynamoDB?

@franzns
Copy link
Contributor Author

franzns commented Jan 5, 2024

The update-lifetime-values-for-all-pools job seems to be a heavy, I refactored it a bit and DB usage went down a567a42

usage spikes are gone:

Image

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