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

Commitae0ee62

Browse files
authored
fix(coderd/database): improve data exclusion inUpsertTemplateUsageStats (#12764)
The PostgreSQL query analyzer wasn't able to eliminate the agent stats without re-introducing this filter.Before:https://explain.dalibo.com/plan/21h7gb4f4bef391gAfter:https://explain.dalibo.com/plan/721ec1cccee91egc
1 parentf418ece commitae0ee62

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

‎coderd/database/queries.sql.go

Lines changed: 3 additions & 1 deletion
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎coderd/database/queries/insights.sql

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -599,7 +599,9 @@ WITH
599599
JOIN
600600
workspace_agent_statsAS was
601601
ON
602-
date_trunc('minute',was.created_at)=mb.minute_bucket
602+
was.created_at>= (SELECT tFROM latest_start)
603+
ANDwas.created_at< NOW()
604+
AND date_trunc('minute',was.created_at)=mb.minute_bucket
603605
ANDwas.template_id=mb.template_id
604606
ANDwas.user_id=mb.user_id
605607
ANDwas.connection_median_latency_ms>=0

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp