Skip to content

fix(coderd): rewrite template insights query for speed and fix intervals#9300

Merged
mafredri merged 2 commits into
mainfrom
mafredri/perf-improve-tempalte-insights-2
Aug 24, 2023
Merged

fix(coderd): rewrite template insights query for speed and fix intervals#9300
mafredri merged 2 commits into
mainfrom
mafredri/perf-improve-tempalte-insights-2

Conversation

@mafredri
Copy link
Copy Markdown
Member

This query is a bit more performant than the generate_series variant, with the reduction of intervals from 5 minute (generate_series) to 1 minute (date_trunc), we maintain ~ the same speed, albeit slightly faster, as #9299.

@mafredri mafredri requested review from johnstcn and mtojek August 24, 2023 11:05
@johnstcn
Copy link
Copy Markdown
Member

@mafredri Can you share some example query plans from before and after?

@mafredri mafredri merged commit 04d5e3f into main Aug 24, 2023
@mafredri mafredri deleted the mafredri/perf-improve-tempalte-insights-2 branch August 24, 2023 11:38
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants