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
I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
[FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
Please do not modify this template :) and fill in all the required fields.
1. Is this request related to a challenge you're experiencing? Tell me about your story.
Currently, the primary slow queries in our database are originating from the get_paginate_workflow_app_logs method of the WorkflowAppService. I've noticed that there might be room for optimization in the index of the WorkflowAppLog table.
Hey @horochx! 👋 I'm here to help you with bug fixes, answer your questions, and guide you as a potential contributor. Let me know how I can assist you while you wait for a human maintainer.
To address the slow queries in the get_paginate_workflow_app_logs method, you can optimize the indexing strategy on the WorkflowAppLog table. Here are some suggestions:
Composite Index on tenant_id and app_id: This index already exists and helps with filtering by these columns [1].
Index on workflow_run_id: Ensure there is an index on workflow_run_id to optimize the join with the WorkflowRun table [2].
Index on created_at: Adding an index on created_at can improve the performance of ordering operations [2].
Indexes on inputs and outputs: If these columns are frequently used in ilike conditions, consider creating indexes to speed up text searches [2].
Index on created_by and created_by_role: Consider indexing these columns to optimize the join with the EndUser table [2].
Implementing these indexes should help reduce the time taken to filter, join, and order the data, thus improving the performance of the get_paginate_workflow_app_logs method.
Self Checks
1. Is this request related to a challenge you're experiencing? Tell me about your story.
Currently, the primary slow queries in our database are originating from the get_paginate_workflow_app_logs method of the WorkflowAppService. I've noticed that there might be room for optimization in the index of the WorkflowAppLog table.
SQL:
2. Additional context or comments
No response
3. Can you help us with this feature?
The text was updated successfully, but these errors were encountered: