-
Notifications
You must be signed in to change notification settings - Fork 12k
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
perf: optimizing db WorkflowAppLog index #14710
base: main
Are you sure you want to change the base?
Conversation
Hello, please open an issue and link it in the description. |
I've created issue #14752 and attached the relevant SQL statements. I was wondering if adding a partial index on |
Reasonable to add field to the existed index And please make sure all the DDL operations are applied by running |
Thank you for your suggestion. The reason I haven't run |
Can you provide a performance testing process for large-scale datasets? I would like to understand how significant the impact of this improvement can be. Thank you. |
I'm afraid I cannot provide performance testing data from a production environment at this time. The issue is that in our test environment, logs are centralized on specific apps. This setup results in a less noticeable filtering effect after indexing (the number of matched logs only reduced from 2,512,370 to 2,447,919). So, I can't give you reliable real-world performance results. I can only say this change should be theoretically effective 😂. |
Summary
Currently, the primary slow queries in our database are originating from the
get_paginate_workflow_app_logs
method of theWorkflowAppService
. I've noticed that there might be room for optimization in the index of the WorkflowAppLog table.Consequently, I have added the most frequently used fields,
created_at
andworkflow_run_id
, to the index.Close #14752
Screenshots
Checklist
Important
Please review the checklist below before submitting your pull request.
dev/reformat
(backend) andcd web && npx lint-staged
(frontend) to appease the lint gods