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

chore: Slow sql execution for one of the autopilot metrics #3259

Open
sunce86 opened this issue Jan 30, 2025 · 0 comments
Open

chore: Slow sql execution for one of the autopilot metrics #3259

sunce86 opened this issue Jan 30, 2025 · 0 comments
Labels
bug Something isn't working track:maintenance maintenance track

Comments

@sunce86
Copy link
Contributor

sunce86 commented Jan 30, 2025

Background

I noticed a lot of errors in logs:

WARN database_metrics: sqlx::query: slow statement: execution time exceeded alert threshold summary="SELECT COUNT() FROM app_data …" db.statement="\n\nSELECT\n COUNT()\nFROM\n app_data AS a\n LEFT JOIN orders o ON a.contract_app_data = o.app_data\nWHERE\n o.app_data IS NULL;\n" rows_affected=0 rows_returned=1 elapsed=9.034524172s elapsed_secs=9.034524172 slow_threshold=1s

I believe this is related to this query:

https://github.com/cowprotocol/services/blob/main/crates/autopilot/src/database/mod.rs#L92-L104

We should check the performance of this query.

@sunce86 sunce86 added track:maintenance maintenance track bug Something isn't working labels Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working track:maintenance maintenance track
Projects
None yet
Development

No branches or pull requests

1 participant