- Notifications
You must be signed in to change notification settings - Fork928
feat(coderd/database): usetemplate_usage_stats
inGetTemplateAppInsights
query#12669
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
mafredri commentedMar 19, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
f369461
to2eae8f8
Compare7fa004c
tod384842
Compare2eae8f8
to4ae3521
Compared384842
toc10b34b
Comparewa.agent_id = was.agent_id | ||
AND wa.slug = was.slug_or_port | ||
WITH | ||
app_insights AS ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
nit: you may want to drop a comment here, many joins around
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Hmm, in my opinion it's a self-contained sequence of joins and there is a comment inline, is there something more you would like explained in the comment? This is a common pattern when we need to lookup agent (or in our case app) -> template association.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Yeah, exactly this :)
prevent going through joins and "fast-forward" reading query code by human
4ae3521
to2ac8855
Comparec10b34b
toc45caeb
Compareeb52bb7
to37f6f3a
Comparec45caeb
tod481905
Compare37f6f3a
to70ba902
Compare3d14fe4
to04b5c07
Compare70ba902
to4d27721
Compare11871be
to8a9eb15
Compare4d27721
to53a54b0
Compare8a9eb15
to772aa60
Compare772aa60
to460c244
Comparea234c5d
to02b3828
Compare460c244
to87f22f1
Compare958785d
to05780db
Compare2cf5f94
to02d0f24
Compare05780db
to3c67005
Compare02d0f24
todfa069b
Compare3c67005
tobf27a9f
Comparedfa069b
to6fca988
Comparebf27a9f
to8b32a8c
Compare6fca988
to0cd1f85
CompareGetTemplateAppInsights
to usetemplate_usage_stats
template_usage_stats
inGetTemplateAppInsights
query8b32a8c
tobfe4b8a
Compare0cd1f85
to549a837
Comparemafredri commentedMar 25, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
bfe4b8a
tocb74f29
Compare549a837
to6813b73
Compare
Uh oh!
There was an error while loading.Please reload this page.
This PR updates the
GetTemplateAppInsights
query to use rolled uptemplate_usage_stats
instead of raw agent and app stats.