Improve performance of the History page queries #981
Labels
architecture
Issue related to the architecture of the lightning
needs detail
More detail is needed before development can start
Coming off #968.
We have several places where performance of the History page query is hampered, here is a list of things I noticed:
log_lines
and thedataclip
tables have their columns cast into varchars - this is very expensive.finished_at
is exponentially less efficient depending on how many attempts & runs there are.Proposed solutions
DESC NULLS FIRST
index on Runsfinished_at
to improve sort performance. #1899attempt_runs
forattempt_id
and/orrun_id
, currently the compound index doesn't appear to be used for these queries.These solutions are distinct (and should be done regardless) from taking another approach which is creating aggregate tables
References:
invocation.ex:417
-list_work_orders_for_project_query/2
The text was updated successfully, but these errors were encountered: