Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix(coderd/database): improve perf ofGetTemplateInsightsByInterval#12773

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

Conversation

mafredri
Copy link
Member

@mafredrimafredri commentedMar 27, 2024
edited
Loading

@mafredriGraphite App
Copy link
MemberAuthor

This stack of pull requests is managed by Graphite.Learn more about stacking.

Join@mafredri and the rest of your teammates onGraphiteGraphite

THEN (d::timestamptz + (@interval_days::int || ' day')::interval)
ELSE @end_time::timestamptz
END AS to_
LEAST(
Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

LEAST is more performant than case.

mtojek reacted with eyes emoji
@@ -410,6 +413,7 @@ LEFT JOIN
template_usage_stats AS tus
ON
tus.start_time >= ts.from_
AND tus.start_time < ts.to_ -- End time exclusion criteria optimization for index.
Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Main performance optimization.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Nice spotting 👍 👍

@mafredrimafredri marked this pull request as ready for reviewMarch 27, 2024 11:43
@@ -410,6 +413,7 @@ LEFT JOIN
template_usage_stats AS tus
ON
tus.start_time >= ts.from_
AND tus.start_time < ts.to_ -- End time exclusion criteria optimization for index.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Nice spotting 👍 👍

@mafredrimafredri merged commit47fd190 intomainMar 27, 2024
@mafredrimafredri deleted the mafredri/03-27-fix_coderd_database_improve_perf_of_gettemplateinsightsbyinterval_ branchMarch 27, 2024 12:10
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsMar 27, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@mtojekmtojekmtojek approved these changes

@johnstcnjohnstcnAwaiting requested review from johnstcn

Assignees

@mafredrimafredri

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@mafredri@mtojek

[8]ページ先頭

©2009-2025 Movatter.jp